|
REM **********************************************************
REM 文字列のバイト計算
REM **********************************************************
Function ByteLen( strTarget )
Dim i,nLen,nRet,strMoji,nAsc
nRet = 0
nLen = Len( strTarget )
For i = 1 to nLen
nRet = nRet + 2
strMoji = Mid( strTarget, i, 1 )
nAsc = Asc( strMoji )
if &H20 <= nAsc and nAsc <= &H7E then
nRet = nRet - 1
end if
if &HA1 <= nAsc and nAsc <= &HDF then
nRet = nRet - 1
end if
Next
ByteLen = nRet
End Function
| |