Skip to main content

The "string_trim_left" Function

Syntax#

string_trim_left(str, [filter]);
ArgumentTypeDescription
strstringThe string to modify
[filter]stringOptional: A custom list of characters to be trimmed

Description#

Removes spaces from the left side of the string and returns the trimmed result.

If a filter is supplied, any character in the filter string will be trimmed instead. (To also trim spaces, include a space in the filter string.)

Example#

var notes = " +[do, re, mi, fa, so, la, ti, do] % ";
notes = string_trim_left(notes, " [+");
draw_text(x, y, notes);