#PB_String_NoCase does not have any effect in 6.00 C
#PB_String_NoCase does not have any effect in 6.00 C
#PB_String_NoCase does not have any effect in 6.00 C
Str(FindString("TEST_STRING_Xbox","XB", #PB_String_NoCase)
OS: Win 11 64 Bit
Re: #PB_String_NoCase does not have any effect in 6.00 C
Already had a thousand times
s1.s = Str(FindString("TEST_STRING_Xbox","XB", -1, #PB_String_NoCase) )
s1.s = Str(FindString("TEST_STRING_Xbox","XB", -1, #PB_String_NoCase) )
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
-
- Addict
- Posts: 4519
- Joined: Thu Jun 07, 2007 3:25 pm
- Location: Berlin, Germany
Re: #PB_String_NoCase does not have any effect in 6.00 C
The 3rd parameter is the start position. -1 doesn't make sense. A value between 1 and the length of the string used as 1st parameter should be entered as start position.
Re: #PB_String_NoCase does not have any effect in 6.00 C
True,
where was that '-1' thing again that was always forgotten?
where was that '-1' thing again that was always forgotten?
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
Re: #PB_String_NoCase does not have any effect in 6.00 C
Position = FindString(String$, SearchFor$ [, StartPosition [, Modus]])
Why does:
Str(FindString("TEST_STRING_Xbox","XB", #PB_String_NoCase)
not work as shwon in the manual?
Is this a bug of the compiler or the manual, or... in my head?
I changed the string$ using UCase(string.s), now it works.
I am just asking: did I miss something in the manual or is there a logc bug in my mind?
Why does:
Str(FindString("TEST_STRING_Xbox","XB", #PB_String_NoCase)
not work as shwon in the manual?
Is this a bug of the compiler or the manual, or... in my head?
I changed the string$ using UCase(string.s), now it works.
I am just asking: did I miss something in the manual or is there a logc bug in my mind?
Re: #PB_String_NoCase does not have any effect in 6.00 C
You have to read more carefully:
Where is your StartPosition
More precise: you use it as StartPosition.
This is your fault.
is the modus.#PB_String_NoCase
Where is your StartPosition
More precise: you use it as StartPosition.
This is your fault.
Re: #PB_String_NoCase does not have any effect in 6.00 C
Hello, thank you for your feedback:
the startposition is optional, you can give this function a startposition, but you dont have to.
it works without the optional #PB_String_NoCase, if the search string is part of the string (case sensitive), but if you do use #PB_String_NoCase, no string/part is found...
As I used UCase(), everything worked fine...
Here the german part of the manual:
Position = FindString(String$, SuchString$ [, StartPosition [, Modus]])
Beschreibung
Versucht den 'Suchstring$' im angegebenen 'String$' zu finden.
Parameter
String$ Der zu verwendende String.
SuchString$ Der zu suchende String.
StartPosition (optional) Die Startposition, um mit der Suche zu beginnen. Der Index des ersten gültigen Zeichens lautet 1. Wird dieser Parameter nicht angegeben, dann wird der gesamte String durchsucht.
Modus (optional) Dies kann einer der folgenden Werte sein:
#PB_String_CaseSensitive: Suche unter Beachtung der Groß-/Kleinschreibung ("case sensitive", (a=a)) (Standard).
#PB_String_NoCase : Suche ohne Beachtung der Groß-/Kleinschreibung (A=a).
Rückgabewert
Gibt die Position (in Zeichen) des zu suchenden Strings zurück, oder Null wenn der String nicht gefunden wurde. Der Index des ersten Zeichens lautet 1.
Debug FindString("PureBasic", "Bas") ; wird 5 ausgeben
Unterstützte OS
Alle
the startposition is optional, you can give this function a startposition, but you dont have to.
it works without the optional #PB_String_NoCase, if the search string is part of the string (case sensitive), but if you do use #PB_String_NoCase, no string/part is found...
As I used UCase(), everything worked fine...
Here the german part of the manual:
Position = FindString(String$, SuchString$ [, StartPosition [, Modus]])
Beschreibung
Versucht den 'Suchstring$' im angegebenen 'String$' zu finden.
Parameter
String$ Der zu verwendende String.
SuchString$ Der zu suchende String.
StartPosition (optional) Die Startposition, um mit der Suche zu beginnen. Der Index des ersten gültigen Zeichens lautet 1. Wird dieser Parameter nicht angegeben, dann wird der gesamte String durchsucht.
Modus (optional) Dies kann einer der folgenden Werte sein:
#PB_String_CaseSensitive: Suche unter Beachtung der Groß-/Kleinschreibung ("case sensitive", (a=a)) (Standard).
#PB_String_NoCase : Suche ohne Beachtung der Groß-/Kleinschreibung (A=a).
Rückgabewert
Gibt die Position (in Zeichen) des zu suchenden Strings zurück, oder Null wenn der String nicht gefunden wurde. Der Index des ersten Zeichens lautet 1.
Debug FindString("PureBasic", "Bas") ; wird 5 ausgeben
Unterstützte OS
Alle
Re: #PB_String_NoCase does not have any effect in 6.00 C
Oh shit, now I see.....what a shame.....
thank you all for your help, it was too late, too much...
thank you all for your help, it was too late, too much...