文字列が数値を表わすか check する
boost::regex あたりの正規表現 library をつかえというので FA 。なんだけど自分で書いてみた。
- http://github.com/januswel/cpplib/blob/master/header/strcheck.hpp
- http://github.com/januswel/cpplib/blob/master/sample/strcheck/main.cpp
一応 locale を考慮しているので特殊なお国柄でも数値かどうかの check はできる ( はず ) 。ただまぁ一般的な用途なら classic locale で使うのが無難。