Which Sass function is used to get the index of the first occurrence of the substring within string?

18. Which Sass function is used to get the index of the first occurrence of the substring within string?

  1. index(string, substring)
  2. strindex(string, substring)
  3. str-index(string, substring)
  4. get (string, substring)

Answer: C) str-index(string, substring)

Explanation:

The str-index(string, substring) function is used to get the index of the first occurrence of the substring within string.

Example:

str-index("IncludeHelp", "n")
Result: 2

Comments and Discussions!

Load comments ↻






Copyright © 2024 www.includehelp.com. All rights reserved.