code: func utf8StrLen(s string) int {
  	for i, r := range s {
  		for r == utf8.RuneError {
  			// The RuneError value can be an error
  			// sentinel value (if it's size 1) or the same
  			// value encoded properly. Decode it to see if
  			// it's the 1 byte sentinel value.
  			_, size := utf8.DecodeRuneInString(s[i:])
  			if size == 1 {
  				return i
  			}
  		}
  	}
  	return len(s)
  }
docs: // utf8StrLen returns how many prefix bytes of s are valid UTF-8.