[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] |
Find position of one null-terminated substring in another.
Source position: syspchh.inc line 34
function strpos( |
str1: pchar; |
str2: pchar |
):pchar; |
str1: pwidechar; |
str2: pwidechar |
):pwidechar; |
Returns a pointer to the first occurrence of S2 in S1. If S2 does not occur in S1, returns Nil.
None.
|
Find first occurrence of a character in a null-terminated string. |
|
|
Find last occurrence of a character in a null-terminated string. |
Program Example15; Uses strings; { Program to demonstrate the StrPos function. } Const P : PChar = 'This is a PChar string.'; S : Pchar = 'is'; begin Writeln ('Position of ''is'' in P : ',sizeint(StrPos(P,S))-sizeint(P)); end.