getRenderWidth method

int getRenderWidth()

Calculate the render width of a string.

Implementation

int getRenderWidth() {
  int width = 0;
  for (final char in characters) {
    width += char.isFullWidthCharacter() ? 2 : 1;
  }
  return width;
}