- Source:
- string/text.js
Methods
-
<static> bin2Hex(bin)
-
Bin to hex, like 0x7F
Parameters:
Name Type Description binBuffer - Source:
- string/bin2Hex.js
Returns:
- Type
- String
-
<static> compile(str [, settings])
-
Parameters:
Name Type Argument Description strString settingsObject <optional>
Template settings, https://lodash.com/docs/4.17.15#template
- Source:
- string/compile.js
Returns:
- Type
- Template
-
<static> dropIfEndsWith(str, ending)
-
Drop a right part of a string if it ends with ending
Parameters:
Name Type Description strString endingString - Source:
- string/dropIfEndsWith.js
Returns:
- Type
- String
-
<static> ensureEndsWith(str, ending)
-
Ensure a string ends with ending
Parameters:
Name Type Description strString endingString - Source:
- string/ensureEndsWith.js
Returns:
- Type
- String
-
<static> ensureStartsWith(str, starting)
-
Ensure a string starts with starting
Parameters:
Name Type Description strString startingString - Source:
- string/ensureStartsWith.js
Returns:
- Type
- String
-
<static> isQuoted(s)
-
Check a string if it is quoted with " or '
Parameters:
Name Type Description sString - Source:
- string/isQuoted.js
Returns:
- Type
- boolean
-
<static> isWrappedWith(s, q)
-
Check a string if it is started and ended with a given sub-string
Parameters:
Name Type Description sString String to check
qString Sub-srting
- Source:
- string/isWrappedWith.js
Returns:
- Type
- boolean
-
<static> quote(str [, quoteChar])
-
Quote a string.
Parameters:
Name Type Argument Default Description strString quoteCharString <optional>
' - Source:
- string/quote.js
Returns:
- Type
- String
-
<static> replaceAll(str, search, replacement)
-
Replace all occurance of "search" with "replacement" in a string.
3.5x faster than String.replaceAllParameters:
Name Type Description strString searchString replacementString - Source:
- string/replaceAll.js
- See:
-
<static> template(str, values [, settings])
-
Interpolate values
Parameters:
Name Type Argument Description strString valuesObject settingsObject <optional>
Template settings, https://lodash.com/docs/4.17.15#template
- Source:
- string/template.js
Returns:
- Type
- String
-
<static> unquote(str [, unescape] [, quoteSet])
-
Unquote a string
Parameters:
Name Type Argument Default Description strString unescapeboolean <optional>
false True to unescape slashed quote, default false
quoteSetSet | Array <optional>
Set of chars
- Source:
- string/unquote.js
Returns:
- Type
- String