- StringAdd
- StringBufferLen
- StringCompare
- StringConcatenate
- StringFill
- StringFind
- StringGetCharacter
- StringInit
- StringLen
- StringSetLength
- StringReplace
- StringReserve
- StringSetChatacter
- StringSplit
- StringSubstr
- StringToLower
- StringToUpper
- StringTrimLeft
- StringTrimRight
StringSetLength
设置一个字符串的指定长度(以字符为单位)。
bool StringSetLength(
|
参数
string_var
[in][out] 应该用于设置字符新长度的字符串。
new_capacity
[in] 以字符为单位的所需字符串长度。如果new_length小于当前大小,则丢弃多余字符。
返回值
如果执行成功,返回true,否则 - false。若要接收错误代码,应该调用GetLastError()函数。
注意
StringSetLength()函数不会更改为字符串分配的缓冲区大小。
示例:
void OnStart()
|
另见
StringLen、StringBufferLen、 StringReserve StringInit、 StringSetCharacter