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| Name | Type | Description |
|---|---|---|
| subStr | DYNARRAY[] of CHAR | Substring to be located. |
| str | DYNARRAY[] of CHAR | Target string. |
(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.
Loc:=Pos('samp','A sample string');Availability: from All Versions