VS:Pos

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

Function Pos searches for a specified substring contained within in a target string.

Pos returns the position of the substring. If the string is not found, 0 is returned.

FUNCTION Pos(
subStr :DYNARRAY[] of CHAR;
str :DYNARRAY[] of CHAR) : INTEGER;
def vs.Pos(subStr, str):
    return INTEGER

Parameters

subStr DYNARRAY[] of CHAR Substring to be located.
str DYNARRAY[] of CHAR Target string.

Remarks

(Joel Sciamma, 2006.09.08): Pos returns the position of the first character of the first occurrence of the sub-string. The function is case-sensitive.

Example

VectorScript

Loc:=Pos('samp','A sample string');

Python


Version

Availability: from All Versions