fix(stringutil): operate on runes instead of bytes in Truncate (#22388) by johnstcn · Pull Request #22467 · coder/coder

@johnstcn

Fixes #22375

Updates `stringutil.Truncate` to properly handle multi-byte UTF-8
characters.
Adds tests for multi-byte truncation with word boundary.

Created by Mux using Opus 4.6

(cherry picked from commit 0cfa037)

@johnstcn self-assigned this

Mar 2, 2026

@johnstcn johnstcn marked this pull request as ready for review

March 2, 2026 10:56

matifali

@johnstcn johnstcn deleted the cj/r230/stringutil-fix branch

March 2, 2026 11:19