std.json: Fix decoding of UTF-16 surrogate pairs (#16830)

* std.unicode: Add more UTF-16 decoding functions

This mostly makes parts of Utf16LeIterator reusable

* std.json: Fix decoding of UTF-16 surrogate pairs

Before this commit, there were 524,288 codepoints that would get decoded improperly. After this commit, there are 0.

Fixes #16828
a155e35850Ryan Liptak committed on 8/15/2023, 1:11:59 PM· committed by GitHubparentf7b82ed
3 files changedLine totals unavailable