From 80c5173bfd304e91e688ade4dd650efb7d35c2ee Mon Sep 17 00:00:00 2001 From: "David A. Mellis" Date: Mon, 29 Nov 2010 15:14:10 -0500 Subject: Revert "added toInt() function to WString". This reverts commit 448222e4b65e0cf44dfc0c494f7f76901f1fabea. --- cores/arduino/WString.cpp | 16 ---------------- 1 file changed, 16 deletions(-) (limited to 'cores/arduino/WString.cpp') diff --git a/cores/arduino/WString.cpp b/cores/arduino/WString.cpp index b13123b..2718956 100644 --- a/cores/arduino/WString.cpp +++ b/cores/arduino/WString.cpp @@ -434,19 +434,3 @@ void String::toCharArray(char *buf, unsigned int bufsize) strncpy(buf, _buffer, len); buf[len] = 0; } - - -long String::toInt() { - String temp = _buffer; - long value = 0; - - for (unsigned int charPos = 0; charPos < _length; charPos++) { - int thisChar = temp[charPos]; - if (isdigit(thisChar)) { - value *= 10; - value += (thisChar - '0'); - } - } - - return value; -} -- cgit v1.2.3-18-g5258