calcOffset method

int calcOffset(
  1. String formatted
)

Implementation

int calcOffset(String formatted) {
  if (formatted.startsWith('\$')) return formatted.length;
  return formatted.length - 2;
}