Skip to content

Latest commit

 

History

History
33 lines (21 loc) · 682 Bytes

File metadata and controls

33 lines (21 loc) · 682 Bytes

strings.trimStart

export function trimStart *(string(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 *(default ' ')*

Returns

(string): string with the characters removed from beginning

Example

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