'//lcmapstring 映像字串
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
'// lstrlen 返回字串中字元數
private declare function lstrlen lib "kernel32" alias "lstrlena" (byval lpstring as string) as long
'簡體轉繁體
public function jttoft(byval ls_str as string) as string
dim li_strlen as long ' 字串的長度
dim ls_ret as string ' 返回轉回後的字串
li_strlen = 0
li_strlen = lstrlen(ls_str)
ls_ret = space(li_strlen) ' 產生一定長度的空間 用於接收返回後的字串
lcmapstring &h804, &h4000000, ls_str, li_strlen, ls_ret, li_strlen
jttoft = ls_ret
end function
'繁體轉簡體
public function fttojt(byval ls_str as string) as string
dim li_strlen as long ' 字串的長度
dim ls_ret as string '返回的字串
li_strlen = 0
ls_ret = ""
li_strlen = lstrlen(ls_str)
ls_ret = space(ls_str) ' 產生一定的長度的空間 用於接收返回後的字串
lcmapstring &h804, &h200000, ls_str, li_strlen, ls_ret, li_strlen
fttojt = ls_ret
end function
Python 繁體轉簡體
注意 這是在乙個檔案 import 了另乙個檔案 如果出現了異常,可以點進出錯的地方修改 import 繁體 簡體 simplified sentence 憂鬱的台灣烏龜 sentence converter zh hans convert sentence print sentence 簡體 繁體...
C 中文簡體轉繁體
方法一 1 2 中文字元工具類 3 4private const int locale system default 0x0800 5private const int lcmap simplified chinese 0x02000000 6private const int lcmap trad...
VB6用API實現繁體簡體轉換
由於正好需要乙個繁體轉簡體的事情,弄這個函式將就用一下了。private declare function lcmapstring lib kernel32 alias lcmapstringa byval locale as long,byval dwmapflags as long,byval ...