IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> [F] $eql() function case-sensitivity
ptrk.mj
post Jun 7 2011, 18:20
Post #1


Member


Group: Full Members
Posts: 70
Joined: 22-November 09
Member No.: 11355
Mp3tag Version: 2.49



$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.
CODE
$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" smile.gif

Please change the behavior of $eql() function or provide us with another solution.
Go to the top of the page
 
+Quote Post
DetlevD
post Jun 7 2011, 18:58
Post #2


Member


Group: Full Members
Posts: 6718
Joined: 26-May 06
From: Wuppertal, Germany, Planet Earth
Member No.: 3194
Mp3tag Version: 2.85



QUOTE (ptrk.mj @ Jun 7 2011, 19:20) *
$eql() function is case-insensitive despite Mp3tag help file claims it "returns true, if x equals y".
... There's also $strcmp() function ...

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


--------------------
* Beyond that, don't ask, when you don't know what to do with the answer. *
♥ home is where the heart is ♥
Go to the top of the page
 
+Quote Post
dano
post Jun 7 2011, 19:30
Post #3


Moderator


Group: Moderators
Posts: 5651
Joined: 4-September 03
From: Germany
Member No.: 201
Mp3tag Version: 2.84c



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


--------------------
Go to the top of the page
 
+Quote Post
nan4k7
post Nov 27 2014, 00:34
Post #4


Member


Group: Full Members
Posts: 14
Joined: 11-July 12
Member No.: 16668
Mp3tag Version: 2.65



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.
Go to the top of the page
 
+Quote Post
ohrenkino
post Nov 27 2014, 08:37
Post #5


Member


Group: Full Members
Posts: 9229
Joined: 9-December 09
From: Norddeutschland / Northern Germany
Member No.: 11458
Mp3tag Version: 2.85



ZITAT(nan4k7 @ Nov 27 2014, 00:34) *
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.


--------------------
42 - wie war die Frage / what was the question / quelle était la question
Go to the top of the page
 
+Quote Post
DetlevD
post Nov 27 2014, 19:14
Post #6


Member


Group: Full Members
Posts: 6718
Joined: 26-May 06
From: Wuppertal, Germany, Planet Earth
Member No.: 3194
Mp3tag Version: 2.85



QUOTE (ohrenkino @ Nov 27 2014, 08:37) *
It is most annoying that the $eql() function actually reports false positives if the compared strings contain umlauts (äöü). ...

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


--------------------
* Beyond that, don't ask, when you don't know what to do with the answer. *
♥ home is where the heart is ♥
Go to the top of the page
 
+Quote Post
ohrenkino
post Nov 27 2014, 19:36
Post #7


Member


Group: Full Members
Posts: 9229
Joined: 9-December 09
From: Norddeutschland / Northern Germany
Member No.: 11458
Mp3tag Version: 2.85



ZITAT(DetlevD @ Nov 27 2014, 19:14) *
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:
http://forums.mp3tag.de/index.php?showtopi...amp;#entry80680

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


--------------------
42 - wie war die Frage / what was the question / quelle était la question
Go to the top of the page
 
+Quote Post
Florian
post Dec 13 2014, 14:04
Post #8


Developer


Group: Admin
Posts: 8101
Joined: 12-December 01
From: Germany, Dresden
Member No.: 203
Mp3tag Version: 2.85



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

Kind regards
Florian


--------------------
♫ If you like using Mp3tag please donate to support further development.

Go to the top of the page
 
+Quote Post
DetlevD
post May 19 2017, 15:38
Post #9


Member


Group: Full Members
Posts: 6718
Joined: 26-May 06
From: Wuppertal, Germany, Planet Earth
Member No.: 3194
Mp3tag Version: 2.85



QUOTE (DetlevD @ Nov 27 2014, 20:14) *
Hmm, this works for me ...
$if($eql('abc ä xyz','abc ä xyz'),'yes','no')' - '$if($eql('abc ä xyz','abc Ä xyz'),'yes','no')
Result : "yes - no"

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 post has been edited by DetlevD: May 19 2017, 16:00


--------------------
* Beyond that, don't ask, when you don't know what to do with the answer. *
♥ home is where the heart is ♥
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 20th November 2017 - 01:30