Public Function NumToString(strNum As String) As String
Dim i As Integer
Dim bytDZ() As Byte, strtemp As String, strtemp1 As String
Dim strD(48 To 57) As String * 1
strD(48) = "零": strD(49) = "一": strD(50) = "二": strD(51) = "三": strD(52) = "四"
strD(53) = "五": strD(54) = "六": strD(55) = "七": strD(56) = "八": strD(57) = "九"
bytDZ = strNum
For i = 0 To UBound(bytDZ) Step 2
If bytDZ(i) > 47 And bytDZ(i) < 58 Then
strtemp = strD(bytDZ(i))
Else
strtemp = ChrB(bytDZ(i)) & ChrB(bytDZ(i + 1))
End If
strtemp1 = strtemp1 & strtemp
Next i
NumToString = strtemp1
End Function
调用方法:NumToString("s四平区36街道4号") 结果为:s四平区三六街道四号
[此贴子已经被作者于2007-1-12 13:18:57编辑过]
|