UTF-8 のバイト位置からコードポイントのカウント位置に変換する処理を書いたhttps://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=8db379b4cab61374ccc05fd425415cb2
どうせ O(n) のコストがかかるのはわかっているので定数倍をなんとか削減しようとした結果こうなった
Mastodon is the best way to keep up with what's happening.
Follow anyone across the fediverse and see it all in chronological order. No algorithms, ads, or clickbait in sight.