Jigsass-tools-strings - 1.4.0
strings
variables
jigsass-str-to-number-suppress-warning
$jigsass-str-to-number-suppress-warning: false !default;
Description
Determines if jigsass-str-to-number
will warn when a string cannot be converted to a number
Type
Boolean
Used by
- [function]
jigsass-str-to-number
functions
jigsass-str-to-number
@function jigsass-str-to-number($number-string) { ... }
Description
Convert a string representing a number into an actual number
Parameters
parameterName | parameterDescription | parameterType | parameterDefault value |
---|---|---|---|
$number-string | —none | String | —none |
Returns
Number
Requires
- [variable]
jigsass-str-to-number-suppress-warning
jigsass-str-trim
@function jigsass-str-trim($string, $leading: true, $trailing: true) { ... }
Description
Trim whitespace from a string
Parameters
parameterName | parameterDescription | parameterType | parameterDefault value |
---|---|---|---|
$string | —none | String | —none |
$leading | —none | Boolean | true |
$trailing | Indicates if trailing whitespace will be removed | Boolean | true |
Returns
String
—The trimmed string
Used by
- [function]
jigsass-str-split
jigsass-str-split
@function jigsass-str-split($string, $separator: false, $limit: false) { ... }
Description
Split a string into a list of strings by separating it into substrings. A sass implementation of Javascript's String.prototype.split()
sans the ability to pass a regular expression as the separator.
Parameters
parameterName | parameterDescription | parameterType | parameterDefault value |
---|---|---|---|
$string | The string to split | String | —none |
$separator | Specifies the character(s) to use for separating the string. If | String | false |
$limit | Integer specifying a limit on the number of splits to be found. | Number or Boolean | false |
Returns
List
Requires
- [function]
jigsass-str-trim
jigsass-str-replace
@function jigsass-str-replace($string, $substr, $new-substr, $replace-all, $match-case) { ... }
Description
Replace a substring inside a string
Parameters
parameterName | parameterDescription | parameterType | parameterDefault value |
---|---|---|---|
$string | The string to search in | String | —none |
$substr | The substring to search for | String | —none |
$new-substr | The substring to replace | String | —none |
$replace-all | Replace all instances of | Boolean | —none |
$match-case | —none | Boolean | —none |
Returns
String
—The replaced string
Used by
- [function]
jigsass-str-escape
- [function]
jigsass-svg-encode
jigsass-str-escape
@function jigsass-str-escape($str) { ... }
Description
Escape special characters in a string.
Parameters
parameterName | parameterDescription | parameterType | parameterDefault value |
---|---|---|---|
$str | The string to escape | String | —none |
Returns
String
—The escaped string
Requires
- [function]
jigsass-str-replace
jigsass-svg-encode
@function jigsass-svg-encode($svg-string) { ... }
Description
Encode an svg string so that it can be used in CSS cross browser with the smallest footprint
Parameters
parameterName | parameterDescription | parameterType | parameterDefault value |
---|---|---|---|
$svg-string | The string to encode | String | —none |
Returns
String
—The encoded svg inside a url function, for use in content
or background-image
Requires
- [function]
jigsass-str-replace