StringPartIndex (rtl)

De Wiki1000
Function StringPartIndex(const AString:string; const ASep:string; const APart:string):Integer;

Cette fonction retourne l'index d'une sous chaîne dans une chaîne constituée de sous chaîne séparées par des caractères sep.

Result L'index de la sous chaîne.
AString La chaîne constituée de sous chaînes.
ASep Le caractère séparateur de sous chaîne.
APart La sous chaîne recherchée.

Exemple

procedure foo(const s:string);
begin
  // s = foo1,foo2,foo3,...
  if StringPartIndex(s,',','foo2')=1 then
   begin
   ...
   end;
end;

Voir aussi:

Développement DSMDéveloppement DSM





Whos here now:   Members 0   Guests 0   Bots & Crawlers 1
 
Outils personnels