VS:SubString/ja

From Vectorworks Developer
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

.VectorScript|VectorScript ..VS:Function Reference|Function Reference ..VS:Function_Reference_Appendix|Appendix

Description

SubString はdelimiterの文字でtext文字列を分解し、index番目のトークンを返します。
最初のトークンは、1番である。
エラーの場合は、(空文字列)を返します。
indexが1より小さいか、トークン数よりも大きい場合、
(空文字列)を返します。

FUNCTION SubString(
text :DYNARRAY[] of CHAR;
delimiter :STRING;
index :INTEGER) : DYNARRAY[] of CHAR;
def vs.SubString(text, delimiter, index):
    return DYNARRAY[] of CHAR

Parameters

text DYNARRAY[] of CHAR
delimiter STRING
index INTEGER

Example

middleStr:=SubString('Left;Middle;Right',';',2);

Version

Availability: from Vectorworks 2014