getTextHeight static method

int getTextHeight(
  1. String text
)

Implementation

static int getTextHeight(String text) {
  int numLines = '\n'.allMatches(text).length + 1;
  return numLines * _lineHeight;
}