<%
Call Money (1605893.21)
Function Money (THENUMBER) DIM MONEY, I, STRING1, STRING2, LENGTH, Checkp 'Defines 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 Thenumber = Replace (theNumber,", "")' removing the decimal end iflength = len (1number) 'acquisition data length Redim One (Length-1) 'redefined array size Redim onStr (length-1)' redefined array size for i = 0 to length-1 One (i) = MID (Thenumber, i 1, 1) 'cycle gets The digital one (i) = MID (String1, One (i) 1, 1) 'cycle acquires the number corresponding to the number corresponding to the number, does not contain the decimal data its number corresponding to the unit OneStr (i) = MID (String2, 14-Length I, 1) Else 'Instr (I) = MID (String2, 15-Length i Len (THENUMBER) -Checkp, 1) end if One (i) = one (i) & onStr (i) 'combines numbers and units NEXT MONEY = Replace (Join (One), "," ")' to get all the elements in the array and connect Money = Replace. Money, "Zero Yuan", "Yuan") Money = Replace (Money, "Zero Wan", "10,000") Money = Replace (Money, "亿", "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%>