Results 1 to 1 of 1

Thread: string search

  1. #1
    Join Date
    Dec 2004
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default string search

    found=pilotRoster[row][col].indexOf(sortBy);

    How can I make the above line case insensitive?
    pilotRoster[row][col] is an Array location containing text.
    sortBy is the string to search for.

    eg if I search for "Cha" at the moment it will reurn Charles etc.
    If I search for "cha" it will find Richard.

    How can I make it so "cha" will return both Charles and Richard?

    Thanks

    Ignore found the solution-

    found=pilotRoster[row][col].toLowerCase().indexOf(sortBy.toLowerCase());
    Last edited by weescotty; 12-29-2004 at 10:14 PM.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •