C++函数网址:http://www.cplusplus.com/
string
string str = "Hello World";
函数名 | 相似函数 | 作用 | 用法 |
---|---|---|---|
sbustr | 字符串的截取 | str.substr(start,length) 从哪里开始取多长 | |
erase | 字符串的删除 | strerase(start,end) 删除某个位置到某个位置的值 | |
assert | 计算表达式的真假 | assert(func) 其值为假,向stderr打印一条出错信息,然后通过调用 abort 来终止程序运行 | |
isalnum | 判断字符变量c是否为字母或数字 | isalnum(c)若是则返回非零,否则返回零 | |
isalpha | 判断字符是否为英文字母 | isalpha(c) 若为英文字母,返回非0(小写字母为2,大写字母为1)。若不是字母,返回0 | |
isblank | isspace、isgraph、ispunct、 | 判断是否为空白字符 | isblank(c) |