Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function EndsWith(s, str: string): Boolean;
- var
- sL: Integer;
- begin
- sL := Length(s);
- if (s <> '') and (str <> '') then
- Result := (s = Copy(str, (Length(str) - (sL - 1)), sL));
- end;
- begin
- ClearDebug;
- if EndsWith('ST', 'TEST') then
- WriteLn('YEP!')
- else
- WriteLn('NOPE.');
- end.
Advertisement
Add Comment
Please, Sign In to add comment