Module

base/utils/string

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.
See:

View Source utils/string.js, line 25

static pxToInt(str) → {Number}

Convert px value to number.
Parameters:
Name Type Description
str String String to convert.

View Source utils/string.js, line 12

Number

static startsWith(str, value) → {Boolean}

Faster String startsWith alternative
Parameters:
Name Type Description
str String Source string.
value String Test string.

View Source utils/string.js, line 38

Boolean