VS:SubString

From Vectorworks Developer
Revision as of 17:33, 18 September 2013 by Unknown user
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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

Description

Function SubString splits the Text string using characters specified in the Delemiters and returns the token located at the Index position.

The first token is located at index 1.
If there is an error the function returns (empty string).
If index is less than 1 or grater than max number of tokens the function returns (empty string).

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