Thread: string array

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

    Join Date
    Aug 2002
    Posts
    19
    Rep Power
    0

    string array


    i need to do a check for :

    "Mrs", "Miss", "Mr", "Mdm", "Ms", "Mrs.", "Miss.", "Mr.", "Mdm.", "MRS", "MISS", "MR", "MDM", "MS", "MRS.", "MISS.", "MR.", "MDM.", "(Mrs)", "(Mdm)"; (*which are user input) and if it exist, i want to remove it before i add to database

    these should not be in the fn.
    i declared it this way:

    String salutations = "Mrs", "Miss", "Mr", "Mdm", "Ms", "Mrs.", "Miss.", "Mr.", "Mdm.", "MRS", "MISS", "MR", "MDM", "MS", "MRS.", "MISS.", "MR.", "MDM.", "(Mrs)", "(Mdm)";
    and the error i get is invalid declaration.
    and how do i remove the salutations from the user input.

    is it possible to store it in an array or smthing.


    pls help asap.. codes will be helpful.
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2002
    Location
    new york
    Posts
    84
    Rep Power
    13
    how bout this:

    Code:
    String[] salutations = { "Mr.", Mrs.", ... };
    or
    Code:
    String salutations[] = new String[] { "Mr.", "Mrs.", ... };

IMN logo majestic logo threadwatch logo seochat tools logo