Skip to content

raylib.GetCodepoint

JoeStrout edited this page Apr 29, 2026 · 2 revisions

Get next codepoint in a UTF-8 encoded text, scanning until '\0' is found When an invalid UTF-8 byte is encountered, exit as soon as possible and a '?'(0x3f) codepoint is returned Total number of bytes processed are returned as a parameter NOTE: The standard says U+FFFD should be returned in case of errors but that character is not supported by the default font in raylib

Parameters

Parameter Default Value Note
text
codepointSize null

Return value

Condition Return Value
(always) map

Notes

Example

// Get the first codepoint from a UTF-8 string
result = raylib.GetCodepoint("Hello", null)
print result.codepoint   // 72 (= 'H')
print result.bytesProcessed

Clone this wiki locally