Again, interesting read, thx.
One caveat i found with indexof
? VAR x := "ABC"
? x:IndexOf("AB")
? x:IndexOf("")
You get (also) "0" back, if by chance/oversight your search string was "lost" prior to searching.
You'll get the same with contains, but in is case, i'd preferred an exception for "Empty". Can't imagine a "useful" search with ""...
Fastest way to determine if a string is contained in another
Fastest way to determine if a string is contained in another
Regards
Karl
(on Win8.1/64, Xide32 2.20, X#2.20.0.3)
Karl
(on Win8.1/64, Xide32 2.20, X#2.20.0.3)
Fastest way to determine if a string is contained in another
Hi Karl,
you should'nt ask if something is 'useful' in the .Net framework. There are many things where you can ask for the use case.
I always look at the docs and don't ask why. I take it as god given or search for something else that is better for my needs.
Stefan
PS: https://docs.microsoft.com/de-de/dotnet ... em_String_
you should'nt ask if something is 'useful' in the .Net framework. There are many things where you can ask for the use case.
I always look at the docs and don't ask why. I take it as god given or search for something else that is better for my needs.
Stefan
PS: https://docs.microsoft.com/de-de/dotnet ... em_String_
Fastest way to determine if a string is contained in another
Hi Stefan,
God? Oh my God
I had looked at the docs, thx.
BTW, a good sample how automatic translation can fail:
The english doc version has a sample, described:
..." The following example looks for "n" in "animal"
gets in German:
"Das folgende Beispiel sucht nach "n" in "Tier"
Good, that they at least didn't translate the code
God? Oh my God
I had looked at the docs, thx.
BTW, a good sample how automatic translation can fail:
The english doc version has a sample, described:
..." The following example looks for "n" in "animal"
gets in German:
"Das folgende Beispiel sucht nach "n" in "Tier"
Good, that they at least didn't translate the code
Regards
Karl
(on Win8.1/64, Xide32 2.20, X#2.20.0.3)
Karl
(on Win8.1/64, Xide32 2.20, X#2.20.0.3)
Fastest way to determine if a string is contained in another
oh yeah, i mostly do read the english version. To understand the german version I often have to read it three times to understand what is meant.
- lumberjack
- Posts: 728
- Joined: Fri Sep 25, 2015 3:11 pm
- Location: South Africa
Fastest way to determine if a string is contained in another
Grrr and there all my efforts to code in German fails miserably...FFF wrote: Good, that they at least didn't translate the code
______________________
Johan Nel
Boshof, South Africa
Johan Nel
Boshof, South Africa