Skip to content

String.TrimStart

boxgaming edited this page Aug 5, 2025 · 3 revisions

Removes whitespace from the beginning of this string and returns a new string, without modifying the original string.

Syntax

result$ = String.TrimStart (s$)

Parameters

  • The s$ parameter contains the string to trim.

Example

Import String From "lib/lang/string.bas"

Print String.TrimStart("    Why was this padded?   "); "|"
Print String.TrimEnd("    Only trim the end     "); "|"

Output

Why was this padded?   |
    Only trim the end|

See Also

String.TrimEnd
Javascript - String.trimEnd()

Clone this wiki locally