Share via


String.trimStart Function

Removes leading white-space characters from a String object.

var trimmedStringVar = myString.trimStart();

Return Value

A copy of the string with all white-space characters removed from the start of the string.

Remarks

Use the trimStart function to remove leading white-space characters from the current String object. Examples of white-space characters are spaces and tabs.

Example

The following example shows how to use the trimStart function to remove leading white space from a current String object.

See Also

Reference

String.trimEnd Function

Other Resources

Language Reference