function compares a string with the one passed as argument using diff Source: core/String.js, line 460