Skip to content

dos_strtrimleft

Dale Fugier edited this page Jul 1, 2026 · 1 revision

Trims leading characters from a string.

Syntax

(dos_strtrimleft string [chars])

Parameters

string

A string.

chars

A string containing the target characters to be trimmed. All trailing occurrences of characters in charswill be trimmed from string. If charsis not specified, this function removes leading newline, space, and tab characters from string.

Returns

The modified string if successful.

nil on error.

Example

Command: (setq str "****Hockey is the best")
"****Hockey is the best"

Command: (dos_strtrimleft str "*")
"Hockey is the best"

Command: (setq str "\t\tHockey is the best")
"\t\tHockey is the best"

Command: (dos_strtrimleft str)
"Hockey is the best"

Clone this wiki locally