Complete the code to convert the string to uppercase.
$text: "hello world"; $result: [1]($text);
The to-upper-case() function converts a string to uppercase in Sass.
Complete the code to get the length of the string.
$text: "Sass"; $length: [1]($text);
strlen.The length() function returns the number of characters in a string in Sass.
Fix the error in the code to extract a substring starting at index 2 with length 3.
$text: "SassLang"; $sub: str-slice($text, [1], 4);
In Sass, string indexes start at 1. To start at the third character (index 2), use 2.
Fill both blanks to check if the string starts with 'Sa' and ends with 'ng'.
$text: "SassLang"; $starts: str-[1]($text, "Sa"); $ends: str-[2]($text, "ng");
contains or index-of instead of start/end checks.Use str-starts-with() to check the start and str-ends-with() to check the end of a string in Sass.
Fill all three blanks to create a new string by inserting 'Cool' at index 5 and then converting to lowercase.
$text: "SassLang"; $new-text: str-[1]($text, "Cool", [2]); $result: str-[3]($new-text);
Use str-insert() to add text at a position, then str-to-lower-case() to convert the result to lowercase.