URGENT

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • the gullers

    URGENT

    I have a problem ... searchResults that is an array of strings has all the
    records found in a search... that is
    searchResults[0] has just one record
    searchResults[1] has another record

    etc.. each record contains info separated by commas I need to separate those
    fields...
    I tried getting fisrth the whole one string...
    then finding the index for the first ,
    and then making a substring with the field so i can print it out
    then cutting the string from whe comma indexto the end..
    i tried doing that with a while loop till tempRecord.leng ht()<0
    but the loop goes infinite so i took it off.. any ideas how to do this?

    -- public void drawSearchResul tsWindow(String[] searchResults)
    {
    for(int i=0; searchResults[i]!=null; i++)
    {
    String tempRecord = searchResults[i];
    int donaji = tempRecord.inde xOf(',');

    String field = tempRecord.subs tring(0, donaji);

    tempRecord = tempRecord.subs tring(donaji);

    }
    }
    Be yourself everybody else is already taken


Working...