The suffix array table has the same length as the text in bytes. The
invariant check in from_parts, however, checks that the suffix array size is
the same as the number of characters. This invariant holds when a string
only contains ASCII characters, but it fails otherwise.
Modify the check to use the length of the string in bytes.
The suffix array table has the same length as the text in bytes. The invariant check in from_parts, however, checks that the suffix array size is the same as the number of characters. This invariant holds when a string only contains ASCII characters, but it fails otherwise.
Modify the check to use the length of the string in bytes.