function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
JamesSSJamesSS 

how to check?

How to compare two strings equal?

 

 

In my code have two strings. Both strings are equal but one string contains ascii character.

 

How to remove ascii character from one string and how to check this in apex code?

Vinita_SFDCVinita_SFDC

Hello James,

Try using TRIM method for the string containing ASCII character. TRIM method  Returns a copy of the string that no longer contains any leading or trailing white space characters.

Leading and trailing ASCII control characters such as tabs and newline characters are also removed. White space and control characters that aren’t at the beginning or end of the sentence aren’t removed.

Refer:http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_methods_system_string.htm