index := Pos('salut', Chaine); if index > 0 then Result := Copy(Chaine,index, Length('salut'));
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre questionFunction GetRightString(Source,Search:String):string; Var Pos:integer; begin Pos:=AnsiPos(Search,Source); result:=RightStr(Source,Length((Source)-StrLenSearch)-Pos+1); end; Par exemple : Label1.Caption:=GetRightString ('abcd123efg','123'); //retourne 'efg'.
uses [...] , StrUtils;