Skip to main content

estimate

Function estimate 

Source
pub fn estimate(text: &str, profile: Profile) -> usize
Expand description

Estimated token count for text under profile.

Returns 0 for empty or whitespace-only input. The result is a ceiling, so a non-empty string always estimates at least 1 token.