?? stringtool.h
字號:
#pragma once
class StringTool
{
private:
/*pSrc是否以pTarget開頭*/
static bool BeginWith(const char* pSrc,char* pTraget,int lowUp=0);
public:
static int ERROR;
static int SUCCESS;
//7.0.441.400
/*查找字符c在pSrc中第n次出現的位置,從0開始, -1未找到*/
static int Find(const char* pSrc,char c,int n=1);
/*查找字符串pTarget在pSrc中的位置 -1未找到,lowUp -1 表示tolower,1 表示touper*/
static int Find(const char* pSrc,char* pTraget,int lowUp=0);
/*查找pSrc中index和index左的字符放到pResult*/
static int Left(const char* pSrc,char* pResult,int index);//pResult是輸出參數,它在外部已分配好空間
/*查找pSrc中index和index右的字符放到pResult*/
static int Right(const char* pSrc,char* pResult,int index);
/*查找pSrc中index和index右len-1個字符放到pResult*/
static int Mid(const char* pSrc,char* pResult,int index,int len);
/*把pSrc中的rSrc替換成rMent,結果放到pResult*/
static int Replace(const char* pSrc,char* pResult,char* rSrc,char* rMent);
/*字符串變成數字*/
static float Str2Num(const char* pSrc);
static float CalculateExperssion(const char* pSrc);
/*
找),找(,得到SubExp,
找'*',找*左右的操作符,得到*的表達式,計算*法
*/
};
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -