C++

作者: 辣鸡吃辣鸡 | 来源:发表于2019-12-18 16:08 被阅读0次

统计字符串中某个字符出现的次数

count(str.begin(), str.end(), c)

字符串加入多个相同的字符

str.append(int n, 'c')

字符串切片,截断

str.substr(0, n)

进制转换

cout << hex << a; // 十六进制
cout << ocx << a; // 八进制

相关文章

网友评论

      本文标题:C++

      本文链接:https://www.haomeiwen.com/subject/oxyunctx.html