dcsimg
Login | Register   
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX

By submitting your information, you agree that devx.com may send you DevX offers via email, phone and text message, as well as email offers about other products and services that DevX believes may be of interest to you. DevX will process your information in accordance with the Quinstreet Privacy Policy.


Tip of the Day
Language: Visual Basic
Expertise: Beginner
Nov 9, 2001

WEBINAR:

On-Demand

Application Security Testing: An Integral Part of DevOps


Test if a Character in a String is a Letter


There is a simple way to test if a character in a string is a letter. Just by using the UCase() And LCase() functions.
 
    Public Function IsLetter(Char As String) 
As Boolean
    Dim sTemp As String
        sTemp = Left$(Char, 1)
        IsLetter = (StrComp(UCase(sTemp), LCase(sTemp), 
vbBinaryCompare) <> 0)
    End Function

Note: I use the StrComp function, to make it work independent of Option Compare.
Andreas Hillqvist
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap
Thanks for your registration, follow us on our social networks to keep up-to-date