Skip to content

raylib.GetCodepointCount

JoeStrout edited this page Nov 16, 2026 · 3 revisions

Get the number of characters (codepoints) in text. An invalid UTF-8 sequence counts as one '?' (0x3f) codepoint

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