【劍指offer】面試題20:表示數值的字符串

20. 表示數值的字符串 請實現一個函數用來判斷字符串是否表示數值(包括整數和小數)。例如,字符串"+100"、「5e2」、"-123"、「3.1416」、「0123"都表示數值,但"12e」、「1a3.14」、「1.2.3」、「±5」、"-1E-16"及"12e+5.4"都不是。git class Solution { public: bool isNumber(string s) {
相關文章
相關標籤/搜索