std.utf.len

std.utf

len(str) -> count

Return the number of UTF-8 characters in a string, ignoring ANSI escapes

Counts the number of UTF-8 characters in a string, properly handling multi-byte characters and ignoring ANSI escape sequences.