Pos (rtl)
Function Pos(Substr:String; S:String):Integer;
Cette fonction retourne la position d'une sous-chaîne à l'intérieur d'une chaîne de caractères.
| Result | La position de la sous-chaîne dans la chaîne; zéro si la sous-chaîne n'est pas trouvée. |
| Substr | Chaîne à retrouver. |
| S | Chaîne où rechercher. |
Exemple
procedure foo(const S:string);
begin
if Pos('foo',S)<>0 then
begin
...
end;
end;
Voir aussi: