rename:更改函数名。

This commit is contained in:
taynpg 2025-01-14 10:32:57 +08:00
parent 6cada82609
commit 7108d1efa9
2 changed files with 6 additions and 6 deletions

View File

@ -242,13 +242,13 @@ public:
public:
#ifdef _WIN32
static std::string u8ToGBK(const std::string& str);
static std::string GBKTou8(const std::string& str);
static std::string u8_to_ansi(const std::string& str);
static std::string ansi_to_u8(const std::string& str);
#endif
/// @brief 删除,段落中的空白字符,如[你好 啊,在 哪里 ?] => [你好啊,在哪里?]
/// 仅处理非 ASCII 码附近的内容。
/// @param str
/// @return
/// @param str
/// @return
static ofString rbs(const ofString& str);
};

View File

@ -113,7 +113,7 @@ ofString OfUtil::get_file_size(long long bytes)
}
#ifdef _WIN32
std::string CCodec::u8ToGBK(const std::string& str)
std::string CCodec::u8_to_ansi(const std::string& str)
{
int wideCharLen = MultiByteToWideChar(CP_UTF8, 0, str.c_str(), -1, nullptr, 0);
if (wideCharLen <= 0) {
@ -131,7 +131,7 @@ std::string CCodec::u8ToGBK(const std::string& str)
gbkStr.resize(gbkLen - 1);
return gbkStr;
}
std::string CCodec::GBKTou8(const std::string& str)
std::string CCodec::ansi_to_u8(const std::string& str)
{
int wideCharLen = MultiByteToWideChar(CP_ACP, 0, str.c_str(), -1, nullptr, 0);
if (wideCharLen <= 0) {