skip to Main Content

Javascript – Unable to understand the difference between normal comparison of strings and comparison using localCompare() method as both works differently

`I am a newbie in JavaScript and to programming. Need assistance to clarify this doubt console.log('a'>'A'); This code returns True let result = 'a'.localeCompare('A'); console.log(result); console.log(Intl.DateTimeFormat().resolvedOptions().locale); This code returns -1 and my locale is en-IN This is creating a confusion…

VIEW QUESTION

Compare two strings containing html tags with same attributes but different orders using C#

I'd like to compare between two strings having html tags in different orders. Example: string str1="""<p><strong style="font-size: 36px; color: rgb(153, 51, 255);">Hello </strong><em><u>World</u></em></p>"""; string str2="""<p><strong style="color: rgb(153, 51, 255); font-size: 36px;">Hello </strong><em><u>World</u></em></p>"""; I care about the text as well as…

VIEW QUESTION
Back To Top
Search