23 lines
631 B
C++
23 lines
631 B
C++
#pragma once
|
|
#include <iostream>
|
|
#include <vector>
|
|
|
|
namespace CVrStringUtils
|
|
{
|
|
/// 数字转字符串
|
|
std::string Int2Str(int nNum);
|
|
std::string Int2HexStr(int nNum);
|
|
std::string Int2str(long num);
|
|
std::string Int2Str(unsigned int nNum);
|
|
std::string Int2Str(unsigned long long nNum);
|
|
|
|
/// 分割字符串
|
|
std::vector<std::string> SplitString(std::string srcStr, std::string delimStr, bool repeatedCharIgnored);
|
|
|
|
/// 大小写转换
|
|
int StringUpper(char *sData, int nLen);
|
|
int StringLower(char *sData, int nLen);
|
|
|
|
/// 替换字符串
|
|
void ReplaceString(std::string& source, const std::string& to_replace, const std::string& replacement);
|
|
}; |