[F] $eql() function case-sensitivity

$eql() function is case-insensitive despite Mp3tag help file claims it "returns true, if x equals y".

Mp3tag lacks case-sensitive boolean function for verifying equality of two strings. At the moment, one must resort to using regular expressions.

E.g.

$if($eql(a,A),x,y)

returns x

There's also $strcmp() function (same name as in foobar2000) but it seems to be just an alias of $eql() in spite of being case-sensitive in foobar.

According to help file syntax of two applications "should be (almost) compatible" :slight_smile:

Please change the behavior of $eql() function or provide us with another solution.

Yes, $strcmp and $stricmp work the same as $eql, but I do not see where these string comparing functions have been documented.

DD.20110607.1958.CEST

I'd like a working $strcmp() function.

I know this is an old post but any chances of an advance with this? I also need a eql or similar function that is able to compare case sensitive values.

It is most annoying that the $eql() function actually reports false positives if the compared strings contain umlauts (äöü).
So, yes: this function does not perform in the expected way.

Hmm, this works for me ...

$if($eql('abc ä xyz','abc ä xyz'),'yes','no')' - '$if($eql('abc ä xyz','abc Ä xyz'),'yes','no')
Result : "yes - no"

DD.20141127.1913.CET

Then there must be something wrong which I cannot identify - please see the description in this thread:
[F] $eql() scheint Schreibweise zu ignorieren

It may be that it works with string constants but for some inexplicable reason it does not work with variables and the $upper function.

This has been addressed with the latest version Mp3tag v2.66.

Kind regards
Florian

Since Mp3tag v2.66 ...
this Formatstring ...
$if($eql('abc ä xyz','abc ä xyz'),'yes','no')' - '$if($eql('abc ä xyz','abc Ä xyz'),'yes','no')
... gives the result "yes - yes".

and this Formatstring ...
$if($StrCmp('abc ä xyz','abc ä xyz'),'yes','no')' - '$if($StrCmp('abc ä xyz','abc Ä xyz'),'yes','no')
... gives the result "yes - no".

DD.20170519.1700.CEST

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.