Skip to content

Latest commit

 

History

History
33 lines (21 loc) · 624 Bytes

trimStart.md

File metadata and controls

33 lines (21 loc) · 624 Bytes

strings.trimStart

trimStart([string], [chars=' '])

TrimStart trims any whitespace or the selected characters from the beginning of the string

Arguments

  1. [string] (string): input string
  2. [chars=' '] (string): characters to remove from beginning of string

Returns

(string): string with the characters removed from beginning

Example

const result = strings.trimStart('-_-abc-_-', '_-');
console.log(result);
> 'abc-_-'