VB的vbFromUnicode、vbUnicode在vb.net中怎么使用 VB的vbFromUnicode、vbUnicode在vb.net中没有对应的
用法,下面的
代码怎么转换: Dim CompName As String * 32 Dim CompName_w As String * 16 Dim e_MyCompName As String CompName_w = MidB(StrConv(CompName,vbFromUnicode),1,Len(CompName_w)) e_MyCompName = RTrim(Replace(StrConv(CompName_w,vbUnicode),Chr(0)," ")) 谢谢。 __________________________________________________________________________ Dim CompName As New String( " ",64) Dim CompName_w As New String( " ",32) Dim e_MyCompName As String CompName_w = StrConv(CompName,128).Substring(0,64)," ")) __________________________________________________________________________ 糟了,我把长度
增加了一倍。 __________________________________________________________________________ 改了, Dim CompName As New String( " ",32) Dim CompName_w As New String( " ",16) Dim e_MyCompName As String CompName_w = StrConv(CompName,Len(CompName_w)) e_MyCompName = Replace(StrConv(CompName_w," ").TrimEnd __________________________________________________________________________ 上面
方法跑起来会出错 __________________________________________________________________________
原文链接:https://www.f2er.com/vb/263917.html