Mega Code Archive

 
Categories / Delphi / Algorithm Math
 

Strtotl stringleri 3erli bloklar halinde yazma 25,000,000 tl gibi

// Bir string'i para formatına çeviren function // Örnek: strtoTL('90000000') -> 90,000,000 TL // Hüseyin Gömleksizoğlu function strtoTL(param: string) : string; var t: integer; TL: string; begin TL := ''; for t:=length(param) downto 1 do begin if (length(param) > t) and (((length(param)-t) mod 3) = 0) then TL := ',' + TL; TL := param[t] + TL; end; Result := TL + ' TL'; end;