[5.61 x86] FindString ignores NoCase

Just starting out? Need help? Post your questions and find answers here.
User avatar
Didelphodon
PureBasic Expert
PureBasic Expert
Posts: 450
Joined: Sat Dec 18, 2004 11:56 am
Location: Vienna - Austria
Contact:

[5.61 x86] FindString ignores NoCase

Post 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).
Go, tell it on the mountains.
User avatar
Bisonte
Addict
Addict
Posts: 1305
Joined: Tue Oct 09, 2007 2:15 am

Re: [5.61 x86] FindString ignores NoCase

Post 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)
PureBasic 6.21 (Windows x64) | Windows 11 Pro | AsRock B850 Steel Legend Wifi | R7 9800x3D | 64GB RAM | RTX 5080 | ThermaltakeView 270 TG ARGB | build by vannicom​​
English is not my native language... (I often use DeepL.)
User avatar
Didelphodon
PureBasic Expert
PureBasic Expert
Posts: 450
Joined: Sat Dec 18, 2004 11:56 am
Location: Vienna - Austria
Contact:

Re: [5.61 x86] FindString ignores NoCase

Post by Didelphodon »

Arghhh! I knew that I must have messed it up somewhere - totally forgot about the position!
Shame on me :-(
Go, tell it on the mountains.
User avatar
Didelphodon
PureBasic Expert
PureBasic Expert
Posts: 450
Joined: Sat Dec 18, 2004 11:56 am
Location: Vienna - Austria
Contact:

Re: [5.61 x86] FindString ignores NoCase

Post by Didelphodon »

@Admin: Please mv /dev/null
Go, tell it on the mountains.
User avatar
NicTheQuick
Addict
Addict
Posts: 1503
Joined: Sun Jun 22, 2003 7:43 pm
Location: Germany, Saarbrücken
Contact:

Re: [5.61 x86] FindString ignores NoCase

Post by NicTheQuick »

You are not the first who forgot this parameter. :mrgreen:
The english grammar is freeware, you can use it freely - But it's not Open Source, i.e. you can not change it or publish it in altered way.
User avatar
Bisonte
Addict
Addict
Posts: 1305
Joined: Tue Oct 09, 2007 2:15 am

Re: [5.61 x86] FindString ignores NoCase

Post by Bisonte »

:mrgreen: The Classic one :

Code: Select all

A$ = PeekS(*Memory, #PB_UTF8)
PureBasic 6.21 (Windows x64) | Windows 11 Pro | AsRock B850 Steel Legend Wifi | R7 9800x3D | 64GB RAM | RTX 5080 | ThermaltakeView 270 TG ARGB | build by vannicom​​
English is not my native language... (I often use DeepL.)
User avatar
skywalk
Addict
Addict
Posts: 4210
Joined: Wed Dec 23, 2009 10:14 pm
Location: Boston, MA

Re: [5.61 x86] FindString ignores NoCase

Post by skywalk »

Haha, my classic fail is forgetting 1 of these?
UsePNGImageDecoder()
UsePNGImageEncoder()
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum
User avatar
Josh
Addict
Addict
Posts: 1183
Joined: Sat Feb 13, 2010 3:45 pm

Re: [5.61 x86] FindString ignores NoCase

Post by Josh »

My classic fail is forgetting the LHS variable in string operations. I.E. writing only

Code: Select all

ReplaceString (xyz$, a$, b$)
sorry for my bad english
User avatar
Didelphodon
PureBasic Expert
PureBasic Expert
Posts: 450
Joined: Sat Dec 18, 2004 11:56 am
Location: Vienna - Austria
Contact:

Re: [5.61 x86] FindString ignores NoCase

Post by Didelphodon »

Interesting how this thread evolved :lol:
Go, tell it on the mountains.
User avatar
NicTheQuick
Addict
Addict
Posts: 1503
Joined: Sun Jun 22, 2003 7:43 pm
Location: Germany, Saarbrücken
Contact:

Re: [5.61 x86] FindString ignores NoCase

Post by NicTheQuick »

But now it should be moved to an other forum. It is obviously no bug. :wink:
The english grammar is freeware, you can use it freely - But it's not Open Source, i.e. you can not change it or publish it in altered way.
#NULL
Addict
Addict
Posts: 1497
Joined: Thu Aug 30, 2007 11:54 pm
Location: right here

Re: [5.61 x86] FindString ignores NoCase

Post 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! :)
Post Reply