Method ToWellFormed
- Namespace
- SimdUnicode
- Assembly
- SimdUnicode.dll
ToWellFormed(char*, int, char*)
Copies inputLength UTF-16 code units from pInputBuffer to
pOutputBuffer, replacing every lone surrogate by U+FFFD.
The two buffers must either be identical (in-place operation) or not overlap.
public static void ToWellFormed(char* pInputBuffer, int inputLength, char* pOutputBuffer)
Parameters
ToWellFormed(ReadOnlySpan<char>, Span<char>)
Copies source to destination, replacing every lone surrogate by U+FFFD.
The spans must either start at the same address (in-place operation) or not overlap.
public static void ToWellFormed(ReadOnlySpan<char> source, Span<char> destination)
Parameters
sourceReadOnlySpan<char>destinationSpan<char>
ToWellFormed(string)
Returns a well-formed copy of input where every lone surrogate is replaced by U+FFFD.
If input is already well formed, it is returned as is (no allocation).
public static string ToWellFormed(string input)
Parameters
inputstring