[Overview][Constants][Types][Classes][Procedures and functions][Variables] | Reference for unit 'sysutils' (#rtl) |
Trim whitespace from the ends of a string.
Source position: line 0
function Trim( |
const S: String |
):String; |
const S: widestring |
):widestring; |
Trim strips blank characters (spaces) at the beginning and end of S and returns the resulting string. Only #32 characters are stripped.
If the string contains only spaces, an empty string is returned.
None.
|
Trim whitespace from the beginning of a string. |
|
|
Trim whitespace from the end of a string. |
Program Example84; { This program demonstrates the Trim function } Uses sysutils; {$H+} Procedure Testit (S : String); begin Writeln ('"',Trim(S),'"'); end; Begin Testit (' ha ha what gets lost ? '); Testit (#10#13'haha '); Testit (' '); End.
No notes exist for this page yet.