roughTokenCountEstimation function

int roughTokenCountEstimation(
  1. String text
)

Rough token count estimation (same heuristic as TS: length / 4).

Implementation

int roughTokenCountEstimation(String text) {
  return (text.length / 4).ceil();
}