17 lines
371 B
C
17 lines
371 B
C
|
#ifndef __HGSTRING_H__
|
|||
|
#define __HGSTRING_H__
|
|||
|
|
|||
|
#include <string>
|
|||
|
|
|||
|
// 标准字符串:windows下为ansi编码,linux下为utf8编码
|
|||
|
|
|||
|
// 去掉前后空格
|
|||
|
void TrimString(std::string& str);
|
|||
|
|
|||
|
// UTF8转标准字符串
|
|||
|
std::string Utf8ToStdString(const char* utf8);
|
|||
|
|
|||
|
// 标准字符串转UTF8
|
|||
|
std::string StdStringToUtf8(const char* str);
|
|||
|
|
|||
|
#endif /* __HGSTRING_H__ */
|