jsToolboxMJK.funcs.trimLeft() - mkloubert/jsToolbox GitHub Wiki
jsToolboxMJK.funcs.trimLeft(obj) method
Removes all whitespaces of the string representation of an object from the beginning.
Syntax
$jsTB.funcs.trimLeft(obj);
Parameters
Name | Type | Description |
---|---|---|
obj | Object | The object to convert. |
Result
The trimmed string of the object.
Examples
var s1 = ' 5979 ';
var s2 = null;
// '5979 '
var res1 = $jsTB.funcs.trimLeft(s1);
// ''
var res2 = $jsTB.funcs.trimLeft(s2);