len method

int len(
  1. int pos
)

Implementation

int len(int pos) {
  return utf8.encode(text.substring(0, pos)).length;
}