Tools Links Login

One-liner - determine whether a string is alphanumeric

This one-line function returns whether or not a string consists of only the characters A-Z, a-z, and 0-9.

Original Author: Kamilche

Code

Public Function AlphaNumeric(ByVal s As String) As Boolean
AlphaNumeric = Not s Like "*[!A-Za-z0-9]*"
End Function

About this post

Posted: 2002-06-01
By: ArchiveBot
Viewed: 76 times

Categories

Visual Basic 6

Attachments

No attachments for this post


Loading Comments ...

Comments

No comments have been added for this post.

You must be logged in to make a comment.