' @(f) ' ' 機能 : ASCIIでのLeftB ' ' 返り値 : 文字列 ' ' 引き数 : ARG1 - 文字列(Unicode) ' ARG2 - (ASCIIでの)文字列長 ' ' 機能説明 : 文字列の左端からASCIIコードでのバイト数分の文字列を返す。 ' ' 備考 : ' Public Function pAsciiLeftB(ByVal strValue As String, _ ByVal intLength As Integer) As String pAsciiLeftB = StrConv(LeftB(StrConv(strValue, vbFromUnicode), _ intLength), vbUnicode) End Function ' @(f) ' ' 機能 : ASCIIバイト長取得 ' ' 返り値 : バイト長 ' ' 引き数 : ARG1 - 文字列(Unicode) ' ' 機能説明 : ASCIIコードでのバイト長を返す。 ' ' 備考 : ' Public Function pAsciiLenB(ByVal strValue As String) As Integer pAsciiLenB = LenB(StrConv(strValue, vbFromUnicode)) End Function ' @(f) ' ' 機能 : ASCIIでのMidB ' ' 返り値 : 文字列 ' ' 引き数 : ARG1 - 文字列(Unicode) ' ARG2 - (ASCIIでの)開始位置 ' ARG3 - (ASCIIでの)文字列長(省略可) ' ' 機能説明 : 文字列のASCIIコードでの開始位置からバイト数分の文字列を返す。 ' ' 備考 : ' Public Function pAsciiMidB(ByVal strValue As String, _ ByVal intStart As Integer, _ Optional ByVal varLength As Variant) As String If IsMissing(varLength) Then pAsciiMidB = StrConv(MidB(StrConv(strValue, vbFromUnicode), _ intStart), vbUnicode) Else pAsciiMidB = StrConv(MidB(StrConv(strValue, vbFromUnicode), _ intStart, varLength), vbUnicode) End If End Function ' @(f) ' ' 機能 : ASCIIでのRightB ' ' 返り値 : 文字列 ' ' 引き数 : ARG1 - 文字列(Unicode) ' ARG2 - (ASCIIでの)文字列長 ' ' 機能説明 : 文字列の右端からASCIIコードでのバイト数分の文字列を返す。 ' ' 備考 : ' Public Function pAsciiRightB(ByVal strValue As String, _ ByVal intLength As Integer) As String pAsciiRightB = StrConv(RightB(StrConv(strValue, vbFromUnicode), _ intLength), vbUnicode) End Function