5 Commits

Author SHA1 Message Date
Jeremy Schonfeld
13f712d7d3
(115217483) paragraphRange(for:) can attempt to form invalid string indices
* (115217483) paragraphRange(for:) can attempt to form invalid string indices

* (115217483) Address off-by-one logic error in separator matching
2023-09-15 13:45:48 -07:00
Charles Hu
14eb5a1f60
Addressed compiler warnings and updated the incorrect license headers (#190) 2023-06-28 11:00:02 -07:00
Karoy Lorentey
85d1021e51
rdar://109907151&110477287 Fix StringProtocol.lineRange(for:)/paragraphRange(for:) (#174)
These started by converting `self` into a `String`. This lead to crashes when `self` happened to be a Substring, as the input range isn’t necessarily a valid index range in the resulting string in that case.

While I’m here, review related helper functions to improve performance and to avoid more correctness issues.
2023-06-09 14:21:12 -07:00
Leonardo da Silva
d267340e84
fix formatting (#86) 2023-05-01 09:49:54 -07:00
Charles Hu
34c45c169c rdar://107156343 (Move JSONEncoder to FoundationPreview) 2023-03-29 09:56:00 -07:00