Skip to content

CStringLength

See Also: CString, CStringSize, String Functions

Purpose

CStringLength returns the number of code-points in a null-terminated UTF-8 CString.

Return Type

Integer

Syntax

(CStringLength({pointer}))

Where:

  • {pointer}: A pointer to a null-terminated C string.

Example

Procedure Test
    Pointer paXml
    Integer iXmlLen
    Handle hXmlNode
    // something moves an XML node into hXmlNode
    Get paXml of hXmlNode to aXml
    Move (CStringLength(paXml)) to iXmlLen
End_Procedure

Notes

  • {pointer} must be a valid pointer to a null-terminated C string.
  • Use of this function with an invalid pointer or a pointer to a non-null terminated C string yields undefined behavior.