PRACTICE / UNDERSTAND / REPEAT

Go: Strings

Practice strings with self-contained questions. Check your answer, then use the explanation to understand the reasoning.

16 questionsAnswers explainedFree · no login
Question 1 of 16
Strings · MCQQuestion link ↗

What does len return for a Go string?

Choose one answer
Answer & explanation

Answer: The number of bytes

UTF-8 can use multiple bytes for one rune, and several runes can form one displayed grapheme.