Commit Graph

8 Commits

Author SHA1 Message Date
Xiaodi Wu
92d492f58b [stdlib] Add a test for string-to-integer parsing for opaque strings. 2021-04-01 13:16:16 -04:00
Jordan Rose
38b3c25b15 [test] XFAIL some String tests on older Apple OSs 2018-10-03 16:54:38 -07:00
Arnold Schwaighofer
2d8a1dbbfe Codesign test/stdlib 2018-08-10 06:58:40 -07:00
Michael Ilseman
3be2faf5d3 [String] Initial implementation of 64-bit StringGuts.
Include the initial implementation of _StringGuts, a 2-word
replacement for _LegacyStringCore. 64-bit Darwin supported, 32-bit and
Linux support in subsequent commits.
2018-01-21 12:32:26 -08:00
Michael Ilseman
b6ac8c61ab [tests] Make sure temporary directory exists 2017-06-29 16:52:17 -07:00
Michael Ilseman
a3e892fca5 [stdlib] Relax ephemeralString sanity check
Creating an ephemeral string from a non-contiguous substring does not
reuse the same storage. Relax a sanity check assuming that it did.
2017-06-28 15:48:17 -07:00
Michael Ilseman
5bc20cba08 [stdlib] Clean up non-contiguous string grapheme breaking code.
Removes the legacy grapheme breaking code paths. Simplifies and
clarifies the non-contiguous grapheme breaking code through consistent
naming and handling of absolute positions vs relative offsets.
2017-06-28 15:46:44 -07:00
Michael Ilseman
a37a823e6e [stdlib] Update non-contiguous NSStrings to Unicode 9
This adds Unicode 9 grapheme breaking support for non-contiguous
NSStrings. Non-contiguous NSStrings that don't hit our fast paths are
very rare, but should still behave identically to contiguous
strings.

We first copy a fixed number of code units into a fixed size buffer
(currently 16 in size) and try to grapheme break inside of that
buffer. This is sufficient storage for all known non-pathological
graphemes. Any graphemes larger than the buffer are handled by copying
larger portions of the string into an Array.

Test cases added, including pathological "zalgo" text that stresses
extremely long graphemes.
2017-06-28 15:35:25 -07:00