CStringSize

See Also: CString, CStringLength, AddressOf, String Functions

Purpose

CStringSize returns the number of bytes in a null terminated CString.

Return Type

Integer

Syntax

 

(CStringSize({CStringAddress})

Where:

Example

 

Procedure Test

    String sCString

    Integer iBytes

 

    // move a CString to sCString

 

    Move (CStringSize(AddressOf(sCString))) to iBytes

End_Procedure

 

Notes

{CStringAddress} must be a valid Pointer to an initialized null terminated C string. Use of this function with an invalid address or an uninitialized address of a non-null terminated C string yields undefined behavior.