I have been using
var str = "Artist - Song";
str = str.replace("-", "feat");
to change some texts to "-".
Recently, I've noticed another "–" that the above code fails to replace. This "–" seems a bit longer than the normal "-".
Is there any way to replace the longer one with the shorter "-"? Any help is appreciated. Thanks
EDIT.
This is how the rest of the code is written.
var befComma = str.substr(0, str.indexOf('-'));
befComma.trim();
var afterhyp = str.substr(str.indexOf("-") + 1);
var changefeat = befComma.toUpperCase();