Is String Empty





-11
Date Submitted Thu. Oct. 13th, 2005 7:29 PM
Revision 1 of 1
Coder mattrmiller
Tags CPlusPlus | Empty | String
Comments 2 comments
Is String Empty
bool IsStringEmpty(CString strString)
{
        // Declare variables
        BOOL bEmpty = true;

        // Go through each character
        for (int i = 0; i < strString.GetLength(); i++)
        {
                if (strString.GetAt(i) != ' ')
                {
                        bEmpty = false;
                        break;
                }
        }

        return bEmpty;
}

Matthew R. Miller

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

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

Comments

Comments Umm, no...
Fri. Jul. 21st, 2006 1:01 AM    Beginner hello2usir
  Comments I believe...
Thu. Aug. 3rd, 2006 12:17 PM    Helper bobbyrward

Voting