Method GetPointerToFirstInvalidByte
- Namespace
- SimdUnicode
- Assembly
- SimdUnicode.dll
GetPointerToFirstInvalidByte(byte*, int, out int, out int)
Given an input buffer pInputBuffer of byte length inputLength,
returns a pointer to where the first invalid data appears in pInputBuffer.
The parameter Utf16CodeUnitCountAdjustment is set according to the content of the valid UTF-8 characters encountered, counting -1 for each 2-byte character, -2 for each 3-byte and 4-byte characters.
The parameter ScalarCodeUnitCountAdjustment is set according to the content of the valid UTF-8 characters encountered, counting -1 for each 4-byte character.
public static byte* GetPointerToFirstInvalidByte(byte* pInputBuffer, int inputLength, out int Utf16CodeUnitCountAdjustment, out int ScalarCodeUnitCountAdjustment)
Parameters
pInputBufferbyte*inputLengthintUtf16CodeUnitCountAdjustmentintScalarCodeUnitCountAdjustmentint
Returns
- byte*
Remarks
Returns a pointer to the end of pInputBuffer if the buffer is well-formed.