Not on my system:
LCase: 138ms
NoCase: 93ms
I also tried this version without enabling the Debugger in the first place:
Code: Select all
Define test1.s,test2.s,elap.q,count.q,t1.q,t2.q
#Max = 10000000
test1="Dies ist ein cooler Test."
test2="test"
elap=ElapsedMilliseconds()
For count=1 To #Max
If FindString(LCase(test1),test2)
EndIf
Next
t1=ElapsedMilliseconds()-elap
elap=ElapsedMilliseconds()
For count=1 To #Max
If FindString(test1,test2,1,#PB_String_NoCase)
EndIf
Next
t2=ElapsedMilliseconds()-elap
result.s = "LCase: " + t1 + ~"ms\n" +
"NoCase: " + t2 + "ms"
MessageRequester("Result", result)
It shows:
LCase: 1672ms
NoCase: 1059ms
By the way. The NoCase-Flag does not work with characters outside the English alphabet. Keep that in mind:
Code: Select all
Debug LCase("Ä") ;shows ä
Debug FindString("ä", "Ä", 1, #PB_String_NoCase); shows 0 (no match)
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.