掲示板システム
ホーム
アクセス解析
カテゴリ
ログアウト
Format関数について (ID:10173)
名前
ホームページ(ブログ、Twitterなど)のURL (省略可)
本文
function PriceToNumber1(const price:string):string; begin result := StringReplace(StringReplace(price,'\','',[rfReplaceAll]), ',','',[rfReplaceAll]); end; function PriceToNumber2(const price:string):string; var i:integer; begin result := price; for i := Length(price) downto 1 do if result[i] in ['\',','] then delete(result,i,1); end; procedure TForm1.Button1Click(Sender: TObject); begin Label1.Caption := PriceToNumber1('\1,000'); Label2.Caption := PriceToNumber2('\1,000'); end;
←解決時は質問者本人がここをチェックしてください。
戻る
掲示板システム
Copyright 2021 Takeshi Okamoto All Rights Reserved.