20 bool match(
const std::string& s1,
const std::string& s2)
26 for (
size_t i = 0; i < n; i++)
27 if (s2[i] !=
'*' && (toupper(s1[i]) != toupper(s2[i]))) {
37 int ssize =
static_cast<int>(s.size());
38 for (
int n = 0; n < ssize; n++)
if (s[n] !=
' '
39 && s[n] !=
'\t' && s[n] !=
'\n') {
60 void getTokens(std::string& s,
int n, std::vector<std::string>& toks,
char delim)
62 string::iterator q, p = s.begin(), end = p + n;
68 for (; p < end; p++) {
74 for (; q < end; q++) {
78 if (inslash < 0 && *q == delim) {
83 tokk.push_back(s.substr(p - s.begin(), q - p));
92 int nt =
static_cast<int>(tokk.size());
94 for (
int i = 0; i < nt; i++) {
95 if (tokk[i][0] ==
'/') {
119 int slen =
static_cast<int>(s.size());
120 string::size_type n = s.find_first_of(
"/");
121 if (n !=
string::npos && (static_cast<int>(n) < slen)) {
123 for (m = static_cast<int>(n)+1; m < slen; m++)
if (s[m] ==
'/') {
127 data = s.substr(n+1,m-n-1);
128 name = s.substr(0,n);
130 s = s.substr(m+1,1000);
156 int n =
static_cast<int>(word.size());
158 cap[0] = (char) toupper(word[0]);
159 for (
int m = 1; m < n; m++) {
160 cap[m] = (char) tolower(word[m]);