Is String Numeric





-4
Date Submitted Thu. Oct. 13th, 2005 7:36 PM
Revision 1 of 1
Coder mattrmiller
Tags CPlusPlus | Numeric | String
Comments 2 comments
Is String Numeric
BOOL IsStringNumeric(CString strString)
{
        // Do not test for comma's
       
        // See if string is numeric or not
        if (strString.FindOneOf("1234567890") == -1 || strString.FindOneOf("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ`~[]{}-_=+\\|'/?><") != -1)
        {
                return false;
        }

        return true;
}

Matthew R. Miller

www.bluecreststudios.com
=================
Matthew R. Miller

http://bluecreststudios.com
http://www.codeandcoffee.com

Comments

Comments Broad criteria
Wed. Oct. 11th, 2006 3:02 PM    Helper shell
Comments Bad filtering
Wed. Aug. 23rd, 2006 8:50 AM    Beginner billism

Voting