C++

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

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

字符串加入多个相同的字符
str.append(int n, 'c')

字符串切片,截断
str.substr(0, n)

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

    推荐阅读