C++学习过程当中积累到的经验(二)

二.string类函数的使用 1.将string类字符串转化为c风格字符串:ch=str.c_str(); 2.用于比较两个string类字符串:str1.compare(str2); 3.查找string的某个元素:find(); find_first_of(); find_last_not_of(); rfind(); 4.检测string类字符串是否非空:str.empty(); 5.获取s
相关文章
相关标签/搜索