String module.
Methods
static pad(n, length, zopt)
Pad function to add leading zeros or any given string.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
n |
String | Number | String or number to pad. | ||
length |
Number | Length to pad. | ||
z |
String |
<optional> |
'0' | String to use for padding. |
static pxToInt(str) → {Number}
Convert px value to number.
Parameters:
Name | Type | Description |
---|---|---|
str |
String | String to convert. |
Number
static startsWith(str, value) → {Boolean}
Faster String startsWith alternative
Parameters:
Name | Type | Description |
---|---|---|
str |
String | Source string. |
value |
String | Test string. |
Boolean