VS:Pos
Jump to navigation
Jump to search
.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