HomeManualTopicsTypesSymbols

std::normalize

trims the string and replaces whitespace by a single space

Parameter

self

Results

None

Description

Returns a string which is the specified string without any leading or trailing whitespace and where all sequences of whitespace are replaced by a single space.

Example

$str " This is a strange text! " $normalized_str normalize(str) println! '*' normalized_str '*'

Output

*This is a strange text!*

Topic

Strings

See also

std_types::string/std::trim