summaryrefslogtreecommitdiff
path: root/src/code_point.zig (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Begin conformance testGravatar Sam Atman2025-05-151-0/+5
| | | | | I'm not sure the details of this strategy can actually be made to work. But, something can.
* Various small iterator improvementsGravatar Sam Atman2025-05-151-4/+51
|
* Add reverse CodePoint iteratorGravatar Sam Atman2025-05-151-1/+67
|
* Maximal Subparts testsGravatar Sam Atman2025-05-151-37/+114
| | | | | The decoder now properly returns substitution bytes according to Substitution of Maximal Subparts, with tests to prove it.
* Replace CodePoint Decoding with Hörhmann MethodGravatar Sam Atman2025-05-151-59/+204
| | | | | | | | This still needs a small barrage of tests to confirm that it correctly performs substitution of maximal subparts (Unicode 16.0.0 §3.9.6). I'm pretty sure this edition is 'overly maximal' actually, the name of the algorithm is somewhat misleading as to what it actually does.
* Add overlong test, which should failGravatar Sam Atman2025-05-141-2/+15
| | | | But does not.
* refactor CodePoint.Iterator into a reusable fnGravatar Jonathan Raphaelson2024-07-051-57/+79
| | | | | | without changing the algorithm at all, move the responsibility of decoding a u8 slice out of the iterator, and into a reusable function so that it can be used by consumers of the library
* codepoint: prevent panic when last cp too shortGravatar Tim Culverhouse2024-06-101-0/+11
| | | | | | | | | | | If the last codepoint in a byte slice is incomplete (IE has a length of 3 but there are only 2 bytes remaining), the iterator will panic. Instead of panicking, prefer to return a replacement character. This strategy is similar to that in the block just above which returns a replacement character if the first byte is not valid. In this latter block, we also consume only one byte and allow the iterator to continue. This allows for sections of text which may have a single byte incorrect near the end of the slice.
* Back to zg code_point. 4ms faster than Ghostty's Utf8DecoderGravatar Jose Colon Rodriguez2024-02-181-29/+39
|
* Code point code is now a method not a field.Gravatar Jose Colon Rodriguez2024-02-181-39/+29
|
* Code point and grapheme are now namespaces.Gravatar Jose Colon Rodriguez2024-02-181-0/+85