Currency 2 capital

xiaoxiao2021-03-06  40

The most streamlined amount of lowercase

The test passed.

Function NuMtochar (const n: real): String; // can be trillion, and can expand the range const cnum: wideString = 'zero 壹 柒捌 - 万 仟 佰 万 万 万仟 佰 元 元 分 '; ccha: array [0..1, 0..12] of string = ((' zero ", 'zero pick', 'zero', 'zero",' 10,000 ',' Iodic ',' billion ',' zero zero ',' zero ',' 万 ',' iodic ',' billion ',' zero "), ('yuan', ' Zero ',' zero ',' zero ',' 10 million, 'billion', 'billion', 'zero', 'zero', '万', 'billion', 'billion', 'yuan')); VAR I: Integer; SNUM, STEMP: WIDESTRING; Begin Result: = '; SNUM: = Format ('% 15d ', [ROUND (n * 100)]); for i: = 0 to 14 do begin STEMP: = COPY (SNUM, I 1, 1); if stemp = '' Then Continue else result: = Result cnum [strt (STEMP) 1] CNUM [i 13]; end; for i: = 0 to 12 do Result: = StringReplace (Result, CCHA [0, I], CCHA [1, I], [RFREPLACEALL]); if POS ('zero ", Result) = 0 Then Result: = StringReplace (Result,' zero angle" , 'Zero', [RFREPLACEALL]) Else Res: = StringReplace (Result, 'zero angle', 'whole', [RFREPLACEALL]); Result: = StringReplace (Result, 'zero ",', [RFREPLACEALL]) End; 2. This I didn't test Function Changdx2 (MMJE: Double): String; const S1: String = 'zero Zhai 叁 肆 柒捌'; S2: STRING = 'Pointing 佰 万 万 万 万 万 万'; Function Strtran (Const S, S1, S2: String): String; Begin Result: = STRINGREPLACE (S, S1, S2, [ RFREPLACEALL]); End; Var S, DX: String; I, LEN: Integer; Begin IF MMJE <0 THEN BEGIN DX: = 'Negative'; mmje: = -mmje; end; s: = format ('%. 0f '

转载请注明原文地址:https://www.9cbs.com/read-59962.html

New Post(0)