Copy link to clipboard
Copied
Hi
Both Strings are not same for some reason even it looks same.One string came from Cmd>notepad>extendscript and other one is just a declared variable. Both are not same and returns false.Any thing i have to do with text encoding?? If so plz tell
//Example
//----------------------
var a= "A2F56"; (Serial number generated in command prompt and saved as text file and read in extend script)
var b="A2F56";
if(a==b){
return true;
}else{
alert("not today ");
}
//---------------
I appreciate ur help!!
Plz Check the screen shot below
Maybe you have some whitespace, linebreaks or whatever at the beginning/end of one of the strings? To verify this, you could check whether the length of the strings is identical. If the length is identical, you could iterate over all characters and see which of them are not identical.
Copy link to clipboard
Copied
Maybe you have some whitespace, linebreaks or whatever at the beginning/end of one of the strings? To verify this, you could check whether the length of the strings is identical. If the length is identical, you could iterate over all characters and see which of them are not identical.
Copy link to clipboard
Copied
String length was different and i have used replace(" ","") to clean the invisible double white space.Is there any way to just clean the string which outputs only visible characters,or bulk replace like : String.clean(\n \d @ $).
Thanks