"trimmed" (string::trimmed)

This function produces a trimmed, new instance of a string.

Synopsis

int string.trimmed();

Parameters

Parameter Description
- -

Description

The function creates a new instance of a string and removes whitespaces from the start and the end of the copy. The original string will still contain the untrimmed content.

A whitespace means Unicode characters from Separator_* categories or certain code points from the Other_Control category; This includes the ASCII characters '\t', '\n', '\v', '\f', '\r', and ' '.

string s = "  123  ";
DebugN(s.trimmed());  => "123"
//s still contains the untrimmed content with the blanks.

Assignment

String