#include <set>
std::set<std::string> setName;
int main()
{
std::string strName = "世界英雄aa";//中文占两个字节,英文占一个字节
const char* name = strName.c_str();
int length = strName.length();//
length = strlen(name);//10
return ;
}
相关文章
- 04-04string length()
- 04-043-3 string包
- 04-04[算法练习]String to Integer (atoi)
- 04-04String path = request.getContextPath(); String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";作用!!!!!
- 04-04【LeetCode每天一题】Length of Last Word(字符串中最后一个单词的长度)
- 04-04Separate String
- 04-0419.2.9 [LeetCode 58] Length of Last Word
- 04-04LeetCode不定时刷题——Length of Last Word
- 04-04String,Date,XMLGregorianCalendar的转换
- 04-04leetcode string 第一个只出现一次的字符