0
0
SASSmarkup~5 mins

Built-in string functions in SASS - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What does the Sass to-upper-case() function do?
It converts all letters in a string to uppercase. For example, to-upper-case('hello') returns 'HELLO'.
Click to reveal answer
beginner
How do you find the length of a string in Sass?
Use the str-length() function. It returns the number of characters in the string, including spaces.
Click to reveal answer
intermediate
What is the purpose of the str-insert() function in Sass?
It inserts one string into another at a specified index. For example, str-insert('hello', 'y', 2) returns 'hyello'.
Click to reveal answer
intermediate
Explain what str-slice() does in Sass.
It extracts a part of a string between two positions. For example, str-slice('hello', 2, 4) returns 'ell'.
Click to reveal answer
beginner
How does to-lower-case() differ from to-upper-case() in Sass?
to-lower-case() converts all letters in a string to lowercase, while to-upper-case() converts them to uppercase.
Click to reveal answer
Which Sass function returns the number of characters in a string?
Astr-length()
Bstr-insert()
Cto-upper-case()
Dstr-slice()
What does str-insert('cat', 's', 4) return?
A'cats'
B'scat'
C'catsc'
D'cat'
Which function changes all letters in a string to uppercase?
Ato-lower-case()
Bstr-slice()
Cto-upper-case()
Dstr-length()
What does str-slice('sass', 2, 3) return?
A'sa'
Bas'
C'ss'
D'as'
Which function would you use to convert 'HELLO' to 'hello' in Sass?
Ato-upper-case()
Bto-lower-case()
Cstr-insert()
Dstr-length()
Describe how to change a string to uppercase and lowercase in Sass using built-in functions.
Think about functions that change letter cases.
You got /3 concepts.
    Explain how to extract a part of a string and how to insert a string inside another string in Sass.
    Focus on functions that manipulate parts of strings.
    You got /4 concepts.