Sass String Functions

Last Updated:

Sass String Functions

The following are the list of inbuilt string functions available in Sass language.

FunctionsExplanation
quote() Returns a string as a quoted string.
str-index() Returns the first index of a substring in a string, or null if a string doesn't contain a substring.
str-insert() Returns a copy of a string with a new letter(s) inserted at the specified index.
str-length() Returns the number of characters in a string.
str-slice() Returns the slice of a string starting at the specified index and ending at the specified index.
to-upper-case() Returns a copy of a string with the ASCII letters converted to upper case.
to-lower-case() Returns a copy of a string with the ASCII letters converted to lower case.
unique-id() Returns a randomly-generated unquoted string that’s guaranteed to be a valid CSS identifier and to be unique within the current Sass compilation.
unquote() Returns a string as an unquoted string.

Share this Page

Meet the Author