PublicFunctionToSBC()FunctionToSBC(ByValinputAsString)AsString'轉全形
DimcAsChar()=input.ToCharArray
DimiAsInteger=0
Whilei
c(i)=ChrW(12288)
ElseIfAscW(c(i))<127then p="">c(i)=ChrW((AscW(c(i))+65248))
EndIf
System.Math.Min(System.Threading.Interlocked.Increment(i),i-1)
EndWhile
ReturnNewString(c)
EndFunction
PublicFunctionToDBC()FunctionToDBC(ByValinputAsString)AsString'轉半形
DimcAsChar()=input.ToCharArray
DimiAsInteger=0
Whilei
c(i)=ChrW(32)
ElseIfAscW(c(i))>65280AndAlsoAscW(c(i))<65375then p="">c(i)=ChrW(AscW(c(i))-65248)
EndIf
System.Math.Min(System.Threading.Interlocked.Increment(i),i-1)
EndWhile
ReturnNewString(c)
EndFunction
65375then>
沒有留言:
張貼留言