#pragma mark 获取字符串长度
int RoutesController::strLength(const std::string &str)
{
if (typeid(str) == typeid(std::string) && str.length()> 0) {
intlen = str.length();
std::vector <<spanclass="s4">std::string> dump;
int i= 0;
while(i < len) {
if (~(str.at(i) >> 8) ==0) {
dump.push_back(str.substr(i,3));
i = i +3;
} else {
dump.push_back(str.substr(i,1));
i = i +1;
}
}
return dump.size();
} else {
printf("str is notstring\n");
return 0;
}
}