VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Checks whether a given character is a punctuation character.

by VB-Kung-Fu (19 Submissions)
Category: String Manipulation
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Thu 9th October 2003
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Checks whether a given character is a punctuation character.

Rate Checks whether a given character is a punctuation character.



'select the first character just in case user passed more than one
Character = Left(Character, 1)

Select Case Asc(Character)
  Case 9, 10, 13, 32 To 37, 39 To 47, 58 To 64, 91 To 96, 123 To 126
     IsPunctuationChar = True
  Case Is > 126
     IsPunctuationChar = True
  Case Else
     IsPunctuationChar = False
End Select
End Function


Download this snippet    Add to My Saved Code

Checks whether a given character is a punctuation character. Comments

No comments have been posted about Checks whether a given character is a punctuation character.. Why not be the first to post a comment about Checks whether a given character is a punctuation character..

Post your comment

Subject:
Message:
0/1000 characters