Possible Duplicate:
Is there a strtol equivalent that does not require a null-terminated string?
strtod with limited string length
I am trying to convert c 'strings' into various c numeric types: int, float, long int... the 'strings' I have are not '\0' terminated chars, but I have lengths for every string, so I have to copy the chars into buffer, add '\0' to the end, then use atoi or strtol...
Are there some lib/functions that already implement functions like the following?
strToInt(char *str, int str_len)
strToFloat(char *str, int str_len)