Activity Forums Salesforce® Discussions What is the difference between contains() and equals() function in Apex ? Reply To: What is the difference between contains() and equals() function in Apex ?

  • Shweta

    Member
    August 20, 2020 at 3:32 pm

    <div><font face="georgia, serif">Contains(): This function returns true if and only if the string that called the method contains the specified sequence of characters in the substring. </font>
    <font color="#333333" face="georgia, serif">Equals():</font><font color="#333333" face="DSCDefaultFontRegular"> </font><font color="#333333" face="georgia, serif">This method is used to perform case sensitive comparisons. In contrast, the == operator performs case sensitive string comparisons to match apex semantics.</font>
    <div>

    </div></div>