Just starting out? Need help? Post your questions and find answers here.
Didelphodon
PureBasic Expert
Posts: 450 Joined: Sat Dec 18, 2004 11:56 am
Location: Vienna - Austria
Contact:
Post
by Didelphodon » Tue Jun 26, 2018 12:03 pm
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.
Bisonte
Addict
Posts: 1305 Joined: Tue Oct 09, 2007 2:15 am
Post
by Bisonte » Tue Jun 26, 2018 12:08 pm
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)
P ureB asic 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 .)
Didelphodon
PureBasic Expert
Posts: 450 Joined: Sat Dec 18, 2004 11:56 am
Location: Vienna - Austria
Contact:
Post
by Didelphodon » Tue Jun 26, 2018 12:50 pm
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.
Didelphodon
PureBasic Expert
Posts: 450 Joined: Sat Dec 18, 2004 11:56 am
Location: Vienna - Austria
Contact:
Post
by Didelphodon » Tue Jun 26, 2018 12:53 pm
@Admin: Please mv /dev/null
Go, tell it on the mountains.
NicTheQuick
Addict
Posts: 1503 Joined: Sun Jun 22, 2003 7:43 pm
Location: Germany, Saarbrücken
Contact:
Post
by NicTheQuick » Tue Jun 26, 2018 2:47 pm
You are not the first who forgot this parameter.
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.
Bisonte
Addict
Posts: 1305 Joined: Tue Oct 09, 2007 2:15 am
Post
by Bisonte » Tue Jun 26, 2018 5:44 pm
The Classic one :
P ureB asic 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 .)
skywalk
Addict
Posts: 4210 Joined: Wed Dec 23, 2009 10:14 pm
Location: Boston, MA
Post
by skywalk » Tue Jun 26, 2018 6:14 pm
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
Josh
Addict
Posts: 1183 Joined: Sat Feb 13, 2010 3:45 pm
Post
by Josh » Tue Jun 26, 2018 8:08 pm
My classic fail is forgetting the LHS variable in string operations. I.E. writing only
sorry for my bad english
Didelphodon
PureBasic Expert
Posts: 450 Joined: Sat Dec 18, 2004 11:56 am
Location: Vienna - Austria
Contact:
Post
by Didelphodon » Thu Jun 28, 2018 9:13 am
Interesting how this thread evolved
Go, tell it on the mountains.
NicTheQuick
Addict
Posts: 1503 Joined: Sun Jun 22, 2003 7:43 pm
Location: Germany, Saarbrücken
Contact:
Post
by NicTheQuick » Thu Jun 28, 2018 9:38 am
But now it should be moved to an other forum. It is obviously no bug.
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
Posts: 1497 Joined: Thu Aug 30, 2007 11:54 pm
Location: right here
Post
by #NULL » Sun Jul 08, 2018 12:11 pm
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!