[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] |
Trim whitespace from the beginning of a string.
Source position: sysstrh.inc line 99
function TrimLeft( |
const S: string |
):string; |
const S: WideString |
):WideString; |
const S: UnicodeString |
Trim strips blank characters (spaces and control characters) at the beginning of S and returns the resulting string. All characters with ordinal values less than or equal to 32 (a space) are stripped.
If the string contains only spaces, an empty string is returned.
None.
|
Trim whitespace from the ends of a string. |
|
|
Trim whitespace from the end of a string. |
Program Example85; { This program demonstrates the TrimLeft function } Uses sysutils; {$H+} Procedure Testit (S : String); begin Writeln ('"',TrimLeft(S),'"'); end; Begin Testit (' ha ha what gets lost ? '); Testit (#10#13'haha '); Testit (' '); End.