atof(將字符串轉(zhuǎn)換成浮點(diǎn)型數(shù))
atoi(將字符串轉(zhuǎn)換成整型數(shù))
atol(將字符串轉(zhuǎn)換成長(zhǎng)整型數(shù))
strtod(將字符串轉(zhuǎn)換成浮點(diǎn)數(shù))
strtol(將字符串轉(zhuǎn)換成長(zhǎng)整型數(shù))
strtoul(將字符串轉(zhuǎn)換成無(wú)符號(hào)長(zhǎng)整型數(shù))
toascii(將整型數(shù)轉(zhuǎn)換成合法的ASCII 碼字符)
toupper(將小寫字母轉(zhuǎn)換成大寫字母)
tolower(將大寫字母轉(zhuǎn)換成小寫字母)
atof(將字符串轉(zhuǎn)換成浮點(diǎn)型數(shù))
相關(guān)函數(shù) atoi,atol,strtod,strtol,strtoul
表頭文件 #include
定義函數(shù) double atof(const char *nptr);
函數(shù)說明 atof()會(huì)掃描參數(shù)nptr字符串,跳過前面的空格字符,直到遇上數(shù)字或正負(fù)符號(hào)才開始做轉(zhuǎn)換,而再遇到非數(shù)字或字符串結(jié)束時(shí)(‘