X
xiongw
Unregistered / Unconfirmed
GUEST, unregistred user!
Private Declare Function LCMapString Lib "kernel32" Alias "LCMapStringA" (ByVal Locale As Long, ByVal dwMapFlags As Long, ByVal lpSrcStr As String, ByVal cchSrc As Long, ByVal lpDestStr As String, ByVal cchDest As Long) As Long<br>Private Declare Function lstrlen Lib "kernel32" Alias "lstrlenA" (ByVal lpString As String) As Long<br><br><br>'简转繁<br><br>Public Function JToF(ByVal Str As String) As String<br> Dim STlen As Long<br> Dim STf As String<br> STlen = lstrlen(Str)<br> STf = Space(STlen)<br> LCMapString &H804, &H4000000, Str, STlen, STf, STlen<br> JToF = STf<br>End Function<br><br><br><br>'繁转简<br><br>Public Function FToJ(ByVal Str As String) As String<br> Dim STlen As Long<br> Dim STj As String<br> STlen = lstrlen(Str)<br> STj = Space(STlen)<br> LCMapString &H804, &H2000000, Str, STlen, STj, STlen<br> FToJ = STj<br>End Function