Skip to content

raylib.GetCodepointCount

JoeStrout edited this page Apr 29, 2026 · 2 revisions

Get total number of characters(codepoints) in a UTF-8 encoded text, until '\0' is found NOTE: If an invalid UTF-8 sequence is encountered a '?'(0x3f) codepoint is counted instead

Parameters

Parameter Default Value Note
text

Return value

Condition Return Value
(always) number

Notes

Example

// Count the number of codepoints in a UTF-8 string
count = raylib.GetCodepointCount("Hello!")
print count  // 6

Clone this wiki locally