FindString ignoring #PB_StringNoCase

Just starting out? Need help? Post your questions and find answers here.
User avatar
SparrowhawkMMU
Posts: 291
Joined: Wed Aug 19, 2015 3:02 pm
Location: United Kingdom

FindString ignoring #PB_StringNoCase

Post by SparrowhawkMMU »

Case insensitive searching appears broken

Code:

Code: Select all

Define a$ = "Hello World"

Debug "world: " + Str(FindString(a$, "world", #PB_String_NoCase))
Debug "World: " + Str(FindString(a$, "World", #PB_String_NoCase))
Output:

Code: Select all

world: 0
World: 7
SpiderBasic 1.40 on OS X 10.11.6

NOTE: This is also happening in PureBasic (5.50) , i.e. the same output is shown. Have I misunderstood the flag or is this a bug in both tools?
Last edited by SparrowhawkMMU on Mon Sep 12, 2016 3:37 pm, edited 1 time in total.
User avatar
Peter
Posts: 1197
Joined: Mon Feb 24, 2014 10:17 pm
Location: 127.0.0.1:9080
Contact:

Re: FindString ignoring #PB_StringNoCase

Post by Peter »

Position = FindString(String$, StringToFind$ [, StartPosition [, Mode]])

;-)
User avatar
SparrowhawkMMU
Posts: 291
Joined: Wed Aug 19, 2015 3:02 pm
Location: United Kingdom

Re: FindString ignoring #PB_StringNoCase

Post by SparrowhawkMMU »

Damn, that's embarrassing! :D

MUST. LEARN. TO. READ. MANUAL !

Thanks Peter.
Post Reply