Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- String s1 = 'Ranger Rover, other text';
- String s2 = 'Range Rover Sport, other text';
- String s1 = 'Range Rover other text';
- String s2 = 'Range Rover Sport other text';
- List<String> lista = new List<String>();
- lista.add(s1);
- lista.add(s2);
- for (String s : lista)
- {
- if (s.indexOf('Range Rover Sport') == -1)
- {
- System.debug('WITHOUT SPORT '+s);
- }
- else {
- System.debug('WITH SPORT '+s);
- }
- }
- list<string> s1list=s1.split(',');
- list<string> s2list=s2.split(',');
- if(s1list[1]==s2list[1]){
- do stuff
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement