String s = 'a b c d e f g h i j k l m';
System.debug(s.split(''));
above code returns (, a, , b, , c, , d, , e, ...)
am I missing something? Please help
Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It only takes a minute to sign up.
Sign up to join this communityString s = 'a b c d e f g h i j k l m';
System.debug(s.split(''));
above code returns (, a, , b, , c, , d, , e, ...)
am I missing something? Please help
I think its issue with logs which shows "..." after some text. Please try this:
String s = 'a b c d e f g h i j k l m';
for(String s1 : s.split(' ')){
System.debug('value ' + s1);
}
Hope this will show you all values.