プログラミングの上手い奴の特徴 0x01at PROG
プログラミングの上手い奴の特徴 0x01 - 暇つぶし2ch655:仕様書無しさん
10/01/05 20:17:46
正規表現を使うほどのコードじゃないと思う。
std::string HakureiReimu(std::string str)
{
  std::string result;
  if(str.find('.') == std::string::npos){
    result = str + ".00000";
  }
  else{
    result = str + "00000";
  }
  if(result[0] == '-'){
    return result.substr(0,6);
  }
  return result.substr(0,5);
}



次ページ
続きを表示
1を表示
最新レス表示
レスジャンプ
類似スレ一覧
スレッドの検索
話題のニュース
おまかせリスト
オプション
しおりを挟む
スレッドに書込
スレッドの一覧
暇つぶし2ch