Open GoogleCodeExporter opened 9 years ago
[deleted comment]
[deleted comment]
Here's another useful function, stringToInt(). Should probably be re-written
using only a char array, but it works great with Strings as is:
int stringToInt(String thisString) {
int value = 0;
for (int charPos = 0; charPos < thisString.length(); charPos++) {
int thisChar = thisString.charAt(charPos);
if (isdigit(thisChar)) {
value = value * 10;
value = value + (thisChar - '0');
}
}
return value;
}
Original comment by tom.i...@gmail.com
on 23 Nov 2010 at 11:27
Maybe also:
#define isLetter(char c) (c >= 'A' && c <= 'Z')
Original comment by tom.i...@gmail.com
on 23 Nov 2010 at 11:31
Original issue reported on code.google.com by
tom.i...@gmail.com
on 13 Nov 2010 at 6:21