Skip to content

Commit

Permalink
docs: typo
Browse files Browse the repository at this point in the history
  • Loading branch information
caarlos0 committed Jan 22, 2025
1 parent c5f743b commit 899593a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ansi/truncate.go
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ func TruncateLeft(s string, n int, prefix string) string {
return buf.String()
}

// ToCharRange takes a range in byte positions and converts them to chat
// ToCharRange takes start and stop byte positions and converts them to char
// positions.
// You can use this with [Truncate], [TruncateLeft], and [Cut].
func ToCharRange(str string, byteStart, byteStop int) (charStart, charStop int) {
Expand Down

0 comments on commit 899593a

Please sign in to comment.