[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] |
Search for substring in a string.
Source position: line 0
function Pos( |
const substr: shortstring; |
const s: shortstring |
):SizeInt; |
C: Char; |
const s: shortstring |
):SizeInt; |
const Substr: ShortString; |
const Source: AnsiString |
):SizeInt; |
const substr: shortstring; |
c: Char |
):SizeInt; |
const Substr: AnsiString; |
const Source: AnsiString |
):SizeInt; |
c: Char; |
const s: AnsiString |
):SizeInt; |
const Substr: UnicodeString; |
const Source: UnicodeString |
):SizeInt; |
c: Char; |
const s: UnicodeString |
):SizeInt; |
c: UnicodeChar; |
const s: UnicodeString |
):SizeInt; |
c: AnsiString; |
const s: UnicodeString |
):SizeInt; |
c: UnicodeString; |
const s: AnsiString |
):SizeInt; |
c: ShortString; |
const s: UnicodeString |
):SizeInt; |
const Substr: WideString; |
const Source: WideString |
):SizeInt; |
c: Char; |
const s: WideString |
):SizeInt; |
c: WideChar; |
const s: WideString |
):SizeInt; |
c: WideChar; |
const s: AnsiString |
):SizeInt; |
c: AnsiString; |
const s: WideString |
):SizeInt; |
c: WideString; |
const s: AnsiString |
):SizeInt; |
c: ShortString; |
const s: WideString |
):SizeInt; |
c: Char; |
const v: Variant |
):SizeInt; |
s: ShortString; |
const v: Variant |
):SizeInt; |
a: AnsiString; |
const v: Variant |
):SizeInt; |
w: WideString; |
const v: Variant |
):SizeInt; |
w: UnicodeString; |
const v: Variant |
):SizeInt; |
v: Variant; |
const c: Char |
):SizeInt; |
v: Variant; |
const s: ShortString |
):SizeInt; |
v: Variant; |
const a: AnsiString |
):SizeInt; |
v: Variant; |
const w: WideString |
):SizeInt; |
v: Variant; |
const w: UnicodeString |
):SizeInt; |
v1: Variant; |
const v2: Variant |
):SizeInt; |
Pos returns the index of Substr in S, if S contains Substr. In case Substr isn't found, 0 is returned. The search is case-sensitive.
None
|
Returns length of a string. |
|
|
Copy part of a string. |
|
|
Delete part of a string. |
|
|
Insert one string in another. |
Program Example48; { Program to demonstrate the Pos function. } Var S : String; begin S:='The first space in this sentence is at position : '; Writeln (S,pos(' ',S)); S:='The last letter of the alphabet doesn''t appear in this sentence '; If (Pos ('Z',S)=0) and (Pos('z',S)=0) then Writeln (S); end.
lazarus-ccr.sourceforge.net |