converting bake twine the underlying information type


i have string(char*), i need the underlying datatype such int, float, double, short, long, only impression array containing alphabets with out digits(like varchar sql).
for ex:



    char* str1 = "12312"
char* str2 = "231.342"
char* str3 = "234234243234"
char* str4 = "4323434.2432342"
char* str5 = "i enclose wholly alphabets"


given strings, i need initial twine form int typecast an int, on ex:



int no1 = atoi(str1)
float no2 = atof(str2)
long no3 = atol(str3)
double no4 = strtod(str4)
char* varchar1 = strdup(str5)





clarifying bit more...



i have twine the essence alphabets and/or digits and/or special characters. right now, i am means parse twine




  1. identify contains wholly digits,

    here i modify twine brief int long, formed best fit. ( how i know twine converted an brief int long?)

  2. only alphabets, leave string.

  3. digits unparalleled decimal point.

    here i need modify twine boyant double ( same doubt here)

  4. other. leave string



Comments

Popular posts from this blog

list macos calm editors formula editors

how i practical urls indicate .aspx pages asp.net deployed an iis? (preferably but iis)

jaxb - xjc - reworking generated typesafe enum category members