Posted By

sekihin on 06/25/09


Tagged

vb6


Versions (?)

半角チェック


 / Published in: Visual Basic
 

  1. Private Function IsMultiByte (Value As String) As Boolean
  2. Dim LetterCount As Long '文字列の文字数
  3.  
  4. Dim ByteCount As Long '文字列のバイト数
  5.  
  6. LetterCount = Len(Value)
  7.  
  8. ByteCount = LenB(StrConv(Value, vbFromUnicode))
  9.  
  10. If LetterCount <> ByteCount Then IsMultiByte = True
  11.  
  12. End Function

Report this snippet  

You need to login to post a comment.