This post explains how to convert a list of strings to a list of Lowercase .
To convert a list of strings to a list of lowercase , you just need to run a loop over the list and use the "toLowerCase()" method.
public class TolowerCase {
public static void Cases()
{
List<String> Values = new List<String>{'SALES', 'MARKETING', 'SERVICE'};
for(String s : Values)
{
s.toLowerCase();
System.debug('OrignalWord------>>'+s);
System.debug('LowerCaseWord------>>' + s.toLowerCase());
}
}
}
Result :-
Easy right..........!!
Thanks,
Lovesalesforceyes
No comments:
Post a Comment