Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function After(s, str: string): string;
- var
- p, strL, sL: Integer;
- begin
- sL := Length(s);
- strL := Length(str);
- if (sL >= strL) then
- Exit;
- p := Pos(s, str);
- if (p > 0) then
- Result := Copy(str, (p + sL), ((1 + strL) - (p + sL)));
- end;
- var
- str: string;
- begin
- ClearDebug;
- str := 'What comes after this? After() WORKS!';
- WriteLn(After('this? ', str));
- end.
Add Comment
Please, Sign In to add comment