📄 xs.h
字号:
#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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -