34 fString.append(out.str()); \
64 Bool_t hasSpecial =
false;
66 while ( UChar_t
c = in[index++] ) {
67 if (
c ==
'\\' ||
c ==
'\n' ||
c ==
'\t' ||
c ==
'\'' ||
c ==
'\"'
68 ||
c <=
'\x08' || (
c >=
'\x0b' &&
c <=
'\x1f' ) ||
c >=
'\x7f' ) {
78 while ( UChar_t
c = in[index++] ) {
80 if (
c <=
'\x08' || (
c >=
'\x0b' &&
c <=
'\x1f' ) ||
c >=
'\x7f' ) {
continue; }
81 if (
c ==
'\\' ||
c ==
'\n' ||
c ==
'\t' ||
c ==
'\'' ||
c ==
'\"') {
104 const std::string& str,
105 const std::string& tok)
107 const string::size_type S = str.size();
108 const string::size_type toksz = tok.size();
109 string::size_type i = 0;
113 while ( (i<S) && (tok.find(str[i])<=toksz) ) {
116 if (i == S) {
return; }
119 string::size_type j = i+1;
120 while ( (j<S) && !(tok.find(str[j])<=toksz) ) {
125 ls.push_back(str.substr(i,j-i));
134 Double_t
d = strtod(s, &endptr);
135 if (endptr==s && d==0.0) {
return false; }
138 if (strchr(s,
'.')) {
return false; }
139 if (strchr(s,
'E')) {
return false; }
140 if (strchr(s,
'e')) {
return false; }
148 Double_t
d = strtod(s, &endptr);
149 if (endptr==s && d==0.0) {
return false; }
164 if (isvalid) {
return value; }
167 cout <<
"-I- FairUtilString Attempt to convert string "
168 << value <<
" to Bool_t. Result is false \n";
178 if (v ==
"true") {
return true; }
179 if (v ==
"false") {
return false; }
180 if (v ==
"kTRUE") {
return true; }
181 if (v ==
"kFALSE") {
return false; }
182 if (v ==
"TRUE") {
return true; }
183 if (v ==
"FALSE") {
return false; }
184 if (v ==
"True") {
return true; }
185 if (v ==
"False") {
return false; }
186 if (v ==
"on") {
return true; }
187 if (v ==
"off") {
return false; }
188 if (v ==
"On") {
return true; }
189 if (v ==
"Off") {
return false; }
190 if (v ==
"ON") {
return true; }
191 if (v ==
"OFF") {
return false; }
200 std::string::const_iterator p1=s1.begin();
201 std::string::const_iterator p2=s2.begin();
202 while (p1!=s1.end() && p2!=s2.end()) {
203 if (toupper(*p1) != toupper(*p2)) {
204 return (toupper(*p1)<toupper(*p2)) ? -1 : 1;
209 return (s2.size()==s1.size()) ? 0 : (s1.size()<s2.size()) ? -1:1;
214 std::string::size_type locStar = w.find(
'*');
215 if ( locStar == std::string::npos ) {
return s.compare(w); }
216 return strncmp(s.c_str(),w.c_str(),locStar);
222 std::string out(str);
223 unsigned loc = str.size();
226 out[loc] = toupper(out[loc]);
233 std::string out(str);
234 unsigned loc = str.size();
237 out[loc] = tolower(out[loc]);