DecodeRune (FUN)ΒΆ
FUNCTION DecodeRune : RUNE
Unpacks the first UTF-8 encoding in pbyData and returns the rune and
its length in bytes.
If pbyData is empty it returns (c_diRuneError, udiLength=0).
Otherwise, if the encoding is invalid, it returns (c_diRuneError, udiLength=1`).
Both are impossible results for correct, non-empty UTF-8.
An encoding is invalid if it is incorrect UTF-8, encodes a rune that is out of range, or is not the shortest possible UTF-8 encoding for the value. No other validation is performed.
- InOut:
Scope
Name
Type
Comment
Return
DecodeRuneInput
pbyDataPOINTER TO BYTE
Pointer to the first byte in memory
udiSizeUDINTMemory size in byte
Output
udiLengthUDINTLenght of the rune in bytes