Get the length of a String
Asked 07 September, 2021
Viewed 2.5K times
  • 61
Votes

How do you get the length of a String? For example, I have a variable defined like:

var test1: String = "Scott"

However, I can't seem to find a length method on the string.

30 Answer