code: func iterateStringReverse(text string, callback func(main rune, comb []rune, textPos, textWidth, screenPos, screenWidth int) bool) bool {
  	type cluster struct {
  		main                                       rune
  		comb                                       []rune
  		textPos, textWidth, screenPos, screenWidth int
  	}
  
  	// Create the grapheme clusters.
  	var clusters []cluster
  	iterateString(text, func(main rune, comb []rune, textPos int, textWidth int, screenPos int, screenWidth int) bool {
  		clusters = append(clusters, cluster{
  			main:        main,
  			comb:        comb,
  			textPos:     textPos,
  			textWidth:   textWidth,
  			screenPos:   screenPos,
  			screenWidth: screenWidth,
  		})
  		return false
  	})
  
  	// Iterate in reverse.
  	for index := len(clusters) - 1; index >= 0; index-- {
  		if callback(
  			clusters[index].main,
  			clusters[index].comb,
  			clusters[index].textPos,
  			clusters[index].textWidth,
  			clusters[index].screenPos,
  			clusters[index].screenWidth,
  		) {
  			return true
  		}
  	}
  
  	return false
  }
docs: // iterateStringReverse iterates through the given string in reverse, starting
  // from the end of the string, one printed character at a time. For each such
  // character, the callback function is called with the Unicode code points of
  // the character (the first rune and any combining runes which may be nil if
  // there aren't any), the starting position (in bytes) within the original
  // string, its length in bytes, the screen position of the character, and the
  // screen width of it. The iteration stops if the callback returns true. This
  // function returns true if the iteration was stopped before the last character.