2022-07-06 16:42:53 +08:00
|
|
|
|
/*
|
|
|
|
|
* <EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>߽ӿ<EFBFBD>
|
|
|
|
|
*/
|
2022-07-04 22:17:38 +08:00
|
|
|
|
#ifndef STRING_UTILS_H
|
|
|
|
|
#define STRING_UTILS_H
|
|
|
|
|
#define _CRT_SECURE_NO_WARNINGS
|
|
|
|
|
|
|
|
|
|
#include<string>
|
|
|
|
|
using std::string;
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* <EFBFBD><EFBFBD>double<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ת<EFBFBD><EFBFBD>Ϊ<EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
* @param num <EFBFBD><EFBFBD>ת<EFBFBD><EFBFBD><EFBFBD><EFBFBD>double<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
* @return string ת<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
*/
|
|
|
|
|
string doubleToString(double num);
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* ȥ<EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>β<EFBFBD>ո<EFBFBD>
|
|
|
|
|
* @param str <EFBFBD><EFBFBD>ȥ<EFBFBD><EFBFBD><EFBFBD>ո<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
* @return string ȥ<EFBFBD><EFBFBD><EFBFBD>ո<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
*/
|
|
|
|
|
std::string trim(const std::string& str);
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* ȥ<EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>β<EFBFBD>ո<EFBFBD><EFBFBD><EFBFBD><EFBFBD>м<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ո<EFBFBD>
|
|
|
|
|
* @param str <EFBFBD><EFBFBD>ȥ<EFBFBD><EFBFBD><EFBFBD>ո<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
* @return string ȥ<EFBFBD><EFBFBD><EFBFBD>ո<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
*/
|
|
|
|
|
std::string reduce(const std::string& str);
|
|
|
|
|
|
|
|
|
|
#endif // !STRING_UTILS_H
|