In an Arduino program I\'m working on the GPS sends the coordinates to the arduino through USB. Because of this, the incoming coordinates are stored as Strings. Is there any way
//stringToLong.h
long stringToLong(String value) {
long outLong=0;
long inLong=1;
int c = 0;
int idx=value.length()-1;
for(int i=0;i<=idx;i++){
c=(int)value[idx-i];
outLong+=inLong*(c-48);
inLong*=10;
}
return outLong;
}