str.cxx

changeset 30
6c4efed2dbdd
parent 17
b4fcc69e426a
child 32
d11a034aabfd
equal deleted inserted replaced
29:b4e09ae24bf1 30:6c4efed2dbdd
307 append (tmp); 307 append (tmp);
308 } 308 }
309 309
310 // ============================================================================ 310 // ============================================================================
311 bool str::isnumber () { 311 bool str::isnumber () {
312 ITERATE_STRING (u) 312 ITERATE_STRING (u) {
313 // Minus sign as the first character is allowed for negatives
314 if (!u && text[u] == '-') {
315 printf ("%u was minus sign\n", u);
316 continue;
317 }
318
313 if (text[u] < '0' || text[u] > '9') 319 if (text[u] < '0' || text[u] > '9')
314 return false; 320 return false;
321 }
315 return true; 322 return true;
316 } 323 }
317 324
318 // ============================================================================ 325 // ============================================================================
319 bool str::isword () { 326 bool str::isword () {

mercurial