读取.string当中对应的中文
来源:互联网 发布:房地产网络经纪人 编辑:程序博客网 时间:2024/05/16 05:27
map<string,string>* MapHelper::readStringMapFromString(const string& sourceBuffer, string separate)
{
map<string, string>* textStrings = NULL;
//string sourceBuffer = string((char*)buffer,size);
vector<string> stringlist;
StringUtils::split(sourceBuffer, separate, &stringlist);
textStrings = new map<string, string>();
int counts = stringlist.size();
for (int i = 0; i + 3 < counts; i += 4)
{
string key = stringlist.at(i+1);
string textValue = stringlist.at(i+3);
if ((*textStrings).find(key) != (*textStrings).end()){
CCLOG("Error:Dupliacated TextString,%s",key.c_str());
CCAssert(false,"Key Duplicated!");//如果有一样的报重复出现的错误
}
(*textStrings)[key] = textValue;
}
return textStrings;
}
{
map<string, string>* textStrings = NULL;
//string sourceBuffer = string((char*)buffer,size);
vector<string> stringlist;
StringUtils::split(sourceBuffer, separate, &stringlist);
textStrings = new map<string, string>();
int counts = stringlist.size();
for (int i = 0; i + 3 < counts; i += 4)
{
string key = stringlist.at(i+1);
string textValue = stringlist.at(i+3);
if ((*textStrings).find(key) != (*textStrings).end()){
CCLOG("Error:Dupliacated TextString,%s",key.c_str());
CCAssert(false,"Key Duplicated!");//如果有一样的报重复出现的错误
}
(*textStrings)[key] = textValue;
}
return textStrings;
}
0 0
- 读取.string当中对应的中文
- Java当中的String类
- Java当中的String数据类型
- Android读取图片当中的信息exif
- Qt 当中常用类的中文说明
- Qt 当中常用类的中文说明
- QT当中出现中文的一些解决方案
- 读取XML当中的HTML标签读取XML当中的HTML标签
- java当中randomAccessFile文件随机读取对象的简单使用
- JAVAWEB 当中 JSP 出现中文乱码的解决方案
- java_web当中客户端-服务器端对于中文编码格式的处理
- OpenCV读取yuv420对应的灰度图像
- 把中文转为对应的拼音
- android获取中文对应的汉语拼音
- java获取中文对应的全拼音
- Java中文所对应的编码区间
- discuz 变量所对应的中文
- CEGUI和lua之间的中文交互以及CEGUI当中的中文字符显示
- JBPM6 核心篇 API
- JDBC连接MySQL的一个工具类DBUtil
- Android 环境传感器初探
- 归并排序 问题
- 单选-复选按钮自定义样式
- 读取.string当中对应的中文
- centos6.5源码安装PHP5.6
- 关于Cookie 的HttpOnly属性(java/web操作cookie+Tomcat操作jsessionid)
- 比较好的blog(可以学习)
- 搭建git开发环境
- 使用微信公众平台JS-SDK开发时,注意下面四点可以少踩坑
- nodejs fs.renameSync(files.upload.path, "/tmp/test.png");解决
- 解决Android AVD 没有键盘
- C#读取配置文件