4 ms·
OK, wait, what? Of course two implementations will implement line breaking the same way, it's _specified_ how they should do it. That's the whole point of a spe
by PeCaN 11y ago
OK, wait, what? Of course two implementations will implement line breaking the same way, it's _specified_ how they should do it. That's the whole point of a spec.
ICU and libutf8proc will both break lines for you. They exist specifically to provide implementations of the various Unicode algorithms. They'll also tell if you two character sequences can be considered identical. ICU even provides regexes where ft will match the ligature.
- jstimpfle 11y agoThere is no such one thing as "breaking lines" in Unicode. There are a thousand slightly different ways to do it, in every single locale. That is explicit in the introduction to the first beast you linked yourself... And assuming that a spec (especially a super-complex one, that moreover constantly evolves), is devoid of ambiguities, and makes every implementation behave in the same way, or even that every implementation implements the largest part of it, is being a tad idealistic. Sometimes it's all about common sense. For most tasks I will happily continue using strchr or my manual loop and be done with it, thanks.