right() : Used to get last n digits from a String using Apex.
Syntax
Used :
txtSting.right(n);
Explanation :
String txtString = 'sfdcforyou';
String FinalStr = txtString.right(6);
system.debug('FinalStr ===>'+FinalStr); //Return foryou
Debug Output :
No comments:
Post a Comment