"trim" (string::trim)
Removes whitespace from the start and the end.
Synopsis
int string.trim();
Parameters
| Parameter | Description |
|---|---|
| - | - |
Description
Removes whitespace from the start and the end. Whitespace means Unicode characters from Separator_* categories or certain code points from Other_Control category;
This includes the ASCII characters '\t', '\n', '\v', '\f', '\r', and ' '.
Example
main()
{
string original = " Alarm Ack ";
string copy = original.trimmed();
DebugN(original);
original.trim();
DebugN(original);
DebugN(copy);
}
Console output:
WCCOAui1:[" Alarm Ack "]
WCCOAui1:["Alarm Ack"]
WCCOAui1:["Alarm Ack"]
Assignment
String
