CStringSize
See Also: CString, CStringLength, AddressOf, String Functions
Purpose
CStringSize returns the number of bytes in a null-terminated CString.
Return Type
Syntax
(CStringSize({CStringAddress}))
Parameters
- {CStringAddress}: The pointer to the address of a null-terminated C string.
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.