Overview
/
KCL Standard Library
/
Functions
/
string::trimStart

string::trimStartFunction in std::string

Remove whitespace from the start of a string.

Whitespace is defined by Unicode's White_Space property and includes spaces, tabs, newlines, and non-breaking spaces. Only the contiguous whitespace at the start is removed; whitespace inside or at the end of the string is preserved.

The start is the beginning of the string's character sequence, independent of how the text is displayed. If the input is empty or contains only whitespace, this returns an empty string. Unicode normalization and case conversion are not performed.

Arguments

NameTypeDescriptionRequired
textstringThe string to trim.Yes

Returns

string - A sequence of characters

Examples