code: func visibleSize(s string) (int, error) {
  	// This code re-implements the basic functionality of
  	// RuneCountInString to account for special cases. Namely
  	// UTF-8 characters taking up 3 bytes (**) appear as double-width.
  	//
  	// (**) I wonder if that is the set of characters outside of
  	// the BMP <=> the set of characters requiring surrogates (2
  	// slots) when encoded in UCS-2.
  
  	r := strings.NewReader(s)
  
  	var size int
  	for range s {
  		_, runeSize, err := r.ReadRune()
  		if err != nil {
  			return -1, fmt.Errorf("error when calculating visible size of: %s", s)
  		}
  
  		if runeSize == 3 {
  			size += 2 // Kanji and Katakana characters appear as double-width
  		} else {
  			size++
  		}
  	}
  
  	return size, nil
  }
docs: // visibleSize returns the number of columns the string will cover
  // when displayed in the terminal. This is the number of runes,
  // i.e. characters, not the number of bytes it consists of.