#1
  1. No Profile Picture
    Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2002
    Posts
    19
    Rep Power
    0

    check if user input is more than 4 words


    How do i check to see if the name a user entered is more than 4 words.

    Eg 1:Mr Wayne King James (this name is 4 words so we allow it.)
    Eg 2:Mr Wayne King James Lone (this name is 5 words so we disallow it.)

    codes will be very helpful...
    thanks... pls help asap..
  2. #2
  3. No Profile Picture
    Moderator =(8^(|)
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Feb 2002
    Location
    Sacramento, CA
    Posts
    1,710
    Rep Power
    14
    StringTokenizer, split on the space, get a token count (that's how many words).

IMN logo majestic logo threadwatch logo seochat tools logo