Zen API
|
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.
str | String object. |
length | New string length, in character units (excluding null-terminator). |