Zen API
 All Classes Files Functions Variables Typedefs Friends Macros Modules Pages
kStatus kString_SetLength ( kString  str,
kSize  length 
)

Explicitly sets the length of the string.

This function can be used to specify the string length if the string buffer has been directly manipulated.

If the current capacity is less than the specified length, the capacity will be automatically increased. A null terminator will be written at the end of the string buffer.

Use with caution; no error-checking is performed to ensure that the string does not contain extra null terminators prior to the specified length.

Parameters
strString object.
lengthNew string length, in character units (excluding null-terminator).
Returns
Operation status.