Page 1 of 1

[5.61 x86] FindString ignores NoCase

Posted: Tue Jun 26, 2018 12:03 pm
by Didelphodon
On my environment with version 5.61 (x86) FindString seems to ignore the NoCase-option.

Example:

Code: Select all

Debug FindString("test PureBasic test", "purebasic", #PB_String_NoCase)
Debug FindString("test PureBasic test", "PureBasic", #PB_String_NoCase)
Should lead to:
6
6

But leads to:
0
6

Please verify (for newer versions).

Re: [5.61 x86] FindString ignores NoCase

Posted: Tue Jun 26, 2018 12:08 pm
by Bisonte
you forgot the parameter "StartPosition"

Code: Select all

FindString(String$, StringToFind$, StartPosition, Flags)
in your case it must be written like...

Code: Select all

FindString("test PureBasic test", "purebasic", 1, #PB_String_NoCase)

Re: [5.61 x86] FindString ignores NoCase

Posted: Tue Jun 26, 2018 12:50 pm
by Didelphodon
Arghhh! I knew that I must have messed it up somewhere - totally forgot about the position!
Shame on me :-(

Re: [5.61 x86] FindString ignores NoCase

Posted: Tue Jun 26, 2018 12:53 pm
by Didelphodon
@Admin: Please mv /dev/null

Re: [5.61 x86] FindString ignores NoCase

Posted: Tue Jun 26, 2018 2:47 pm
by NicTheQuick
You are not the first who forgot this parameter. :mrgreen:

Re: [5.61 x86] FindString ignores NoCase

Posted: Tue Jun 26, 2018 5:44 pm
by Bisonte
:mrgreen: The Classic one :

Code: Select all

A$ = PeekS(*Memory, #PB_UTF8)

Re: [5.61 x86] FindString ignores NoCase

Posted: Tue Jun 26, 2018 6:14 pm
by skywalk
Haha, my classic fail is forgetting 1 of these?
UsePNGImageDecoder()
UsePNGImageEncoder()

Re: [5.61 x86] FindString ignores NoCase

Posted: Tue Jun 26, 2018 8:08 pm
by Josh
My classic fail is forgetting the LHS variable in string operations. I.E. writing only

Code: Select all

ReplaceString (xyz$, a$, b$)

Re: [5.61 x86] FindString ignores NoCase

Posted: Thu Jun 28, 2018 9:13 am
by Didelphodon
Interesting how this thread evolved :lol:

Re: [5.61 x86] FindString ignores NoCase

Posted: Thu Jun 28, 2018 9:38 am
by NicTheQuick
But now it should be moved to an other forum. It is obviously no bug. :wink:

Re: [5.61 x86] FindString ignores NoCase

Posted: Sun Jul 08, 2018 12:11 pm
by #NULL
Just happened to me too that NoCase "didn't work", and i thought.. wasn't there a bug report lately?
Didelphodon wrote:@Admin: Please mv /dev/null
No! Thanks for documenting it! :)