Robert Martens
17th February 2011, 19:37
At Gavino's suggestion (http://forum.doom9.org/showthread.php?p=1478732#post1478732), I'm starting a thread here to get some clarification.
While testing a recent update to a script of mine, I traced some unexpected behavior to the apparent case sensitivity of FindStr(). While I'd think such a feature might be useful to some people, it seems inconsistent with the other string functions (LeftStr, MidStr, RightStr, all case insensitive) and, as Gavino noted, the logical operators as applied to strings.
Beyond that, the example in the documentation, calling FindStr("AviSynth","syn") and getting a return value of 4, doesn't work; the function returns 0, unless I capitalize the 's' in "syn". I've found this happens in 2.5.6, 2.5.7, 2.5.8, SEt's 2.5.8MT, and the September 27th, 2009 2.6.0 alpha.
I've been able to avoid the issue in my own script by way of calling LCase() on strings before comparing them, but I'm still curious: is this sensitivity by design, and only a mixup in the docs, or is it an actual bug?
While testing a recent update to a script of mine, I traced some unexpected behavior to the apparent case sensitivity of FindStr(). While I'd think such a feature might be useful to some people, it seems inconsistent with the other string functions (LeftStr, MidStr, RightStr, all case insensitive) and, as Gavino noted, the logical operators as applied to strings.
Beyond that, the example in the documentation, calling FindStr("AviSynth","syn") and getting a return value of 4, doesn't work; the function returns 0, unless I capitalize the 's' in "syn". I've found this happens in 2.5.6, 2.5.7, 2.5.8, SEt's 2.5.8MT, and the September 27th, 2009 2.6.0 alpha.
I've been able to avoid the issue in my own script by way of calling LCase() on strings before comparing them, but I'm still curious: is this sensitivity by design, and only a mixup in the docs, or is it an actual bug?