Skip to content

Wonkey types string fromcstring

wonkey:wonkey.types.String.FromCString

Function FromCString:String( buf:Void Ptr,bufSize:Int )#
Function FromCString:String( buf:Void Ptr )#

Creates a string from a CString.

If bufSize is specified, the CString may contain null characters which will be included in the string.

If bufSize is not specified, the CString must be correctly null terminated or Bad Things Will Happen.

Parameters
buf buf The memory buffer containing the CString.
bufSize bufSize The size of the memory buffer in bytes.