say i have 2 strings, Boolean hasName = false;
String employeeNames = "lee,anne,peter,sam,paul";
String managerNames = "ken,lee,sue,tim,alex";
so, what s the best way to iterate through 2 strings and find out both strings contains "lee", then i can set
hasName = true;
these are just a simple sample.. i dont want answer such as employeeNames.contains("lee") or something like that, because my data in real product are all dynamic and can be very long string...i wont know what i am getting, but as soon as i received 2 strings, i need to find out they r contianning at least one common item or not... what is the best way to this algrothoim? one more thing , the items in string all separete by "," so is there anything i can do ? thanks