Transform the renminbi to uppercase representation

xiaoxiao2021-03-06  40

Transform the renminbi to uppercase representation

<% Call Money (222222222222) Function Money (THENUMBER) DIM MONEY, I, STRING1, STRING2, Length, Checkp 'Define Variables DIM One (), OneStr () Definition Array

String1 = "Zero 壹 叁 伍 柒捌" String2 = "Wan Yiyi picks up hundreds of millions of 佰 万 万 佰 佰 分 分"

Checkp = INSTR (TheNumber, ".) 'Judging whether there is a decimal IF CHECKP <> 0 damper = replace (teller,". "," ")' removes the decimal end if

LENGTH = LEN (THENUMBER) 'Number Data Length Redim One (Length-1)' Redefined Array Size Redim OneStr (Length-1) 'Redefined Array Size

For i = 0 to Length-1

One (i) = MID (THENUMBER, I 1, 1) 'loops gets the number one (i) = MID (String1, One (I) 1, 1)' cycle acquisition of numbers

If CHECKP = 0 THEN 'does not contain a decimal data its digital corresponding unit OneSTR (i) = MID (String2, 14-Length I, 1) Else' Contains Data Number of Digital The unit OneStr (i) = MID (String2, 15-Length I Len (THENUMBER) -Checkp, 1) endiff one (i) = one (i) & onestr (i) 'Put numbers with unit combination Next

Money = Replace (Join (One), "," "") 'acquires all the elements in array and connects Money = Replace (Money, "Zero Yuan", "Yuan") Money = Replace (Money, "万 万"," 10,000 ") Money = Replace (Money," 1.0 million "," 100 million ") Money = Replace (Money," Zero "," Zero ") Money = Replace (Money," Zero "," Zero " ) Money = Replace (Money, Zero Pick "," Zero ")

Do While Not Instr (Money, "Zero Zero") = 0 Money = Replace (Money, "Zero Zero", "Zero") LOOP

Response.write Money 'display result END FUNCTION%>

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

New Post(0)