xs.h

来自「一个简单灵活的数据挖掘实验平台」· C头文件 代码 · 共 23 行

H
23 行
字号
#ifndef _STRUTILS_H_
#define _STRUTILS_H_
#include <string>
#include <vector>
using namespace std;
class xs
{
private:
	xs(){}
	~xs(){}
public:
	//: split the string by the delimit characters
	static vector<string> split(const string& str,char* delimits);
	//: change all the characters to lower state
	static void lower(string& str);
	//: change all the characters to uper state
	static void upper(string& str);
	//: test if the string start with specified prefix string 
	static bool start_with(const string& str,string pre,bool sensitive = true);
	//: trims blanks of the both sides of the string
	static string trim(const string& str,string omit = " ");
};
#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?