StringGetChar
StringGetChar
返回字符串中指定位置的字符(代码)。
ushort StringGetChar(
string string_value, // string
int pos // position
);参数
- string_value
[in] 字符串。
- pos
[in] 字符串中的字符位置。范围从 0 到 StringLen(文本) -1。
返回值
如果出错,返回字符代码或 0。要获取关于错误的信息,请调用GetLastError()函数。
示例:
int char_code=StringGetChar("abcdefgh", 2);
// char code of 'c' = 99
最后更新于