strfun.h
来自「小型搜索引擎,用C/C++编写,属于全文搜索引擎」· C头文件 代码 · 共 41 行
H
41 行
#ifndef _STR_FUN_H_030802#define _STR_FUN_H_030802#include <string>#include <sstream>#include <iostream>#include <algorithm>using namespace std;class CStrFun{public: CStrFun(); virtual ~CStrFun(); static void Str2Lower(string &sSource, int nLen); static string itos(int i){ stringstream s; s << i; return s.str(); } /* Locate a substring ignoring case * The function returns a value equal or lager than zero, * or -1 if the substring is not found. */ static string::size_type FindCase(string haystack, string needle); static string::size_type FindCaseFrom(string haystack, string needle, int From);};#endif // end _STR_FUN_H_030802/*ostringstream oss<<Dea<<'.'<<pre();oss.str();*/
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?