You need to sign in to do that
Don't have an account?
GMASJ
Remove or Trim the string
Hi,
I want to write a logic in case subject field to remove FW or RW starting character please suggest me how to implement.
Example :
FW: Case for Testing = Should return only Case for Testing
RW: Case for Testing = Should return only Case for Testing
Thanks
GMASJ
I want to write a logic in case subject field to remove FW or RW starting character please suggest me how to implement.
Example :
FW: Case for Testing = Should return only Case for Testing
RW: Case for Testing = Should return only Case for Testing
Thanks
GMASJ
String newsubject = case.subject.removeStartIgnoreCase('FW:').removeStartIgnoreCase('RW:').trim();
You could also just do a search/replace from anywhere in the string:
String newsubject = case.subject.replace('FW:', '').replace('RW:', '').trim();