B
BILL
Hi Everyone,
I've been looking through these .NET groups and can't find the exact
answer I want, so I'm asking.
Can someone let me know the best way (you feel) to search a C# string
for an occurance of a CASE INSENSITIVE substring, returning the found
position. I'm speaking of larger strings to search as well ~50K-500K.
Here's what I have so far:
* ToUpper/ToLower and IndexOf would be quite slow, right? as strings
are immutable and these search strings are larger to begin with.
* RegEx could be the answer, but I'm not sure pattern matching would
be the right solution for this problem
* Any unsafe code, Boyer-Moore using pointers or inline assembly (if
that's possible), would seem the best, but well, it's unsafe code
* I've found a MapTable example here in the C# nj (thanks maptable
person), and think this might be the best solution
Any help is appreciated, thanks in advance!
BILL
I've been looking through these .NET groups and can't find the exact
answer I want, so I'm asking.
Can someone let me know the best way (you feel) to search a C# string
for an occurance of a CASE INSENSITIVE substring, returning the found
position. I'm speaking of larger strings to search as well ~50K-500K.
Here's what I have so far:
* ToUpper/ToLower and IndexOf would be quite slow, right? as strings
are immutable and these search strings are larger to begin with.
* RegEx could be the answer, but I'm not sure pattern matching would
be the right solution for this problem
* Any unsafe code, Boyer-Moore using pointers or inline assembly (if
that's possible), would seem the best, but well, it's unsafe code
* I've found a MapTable example here in the C# nj (thanks maptable
person), and think this might be the best solution
Any help is appreciated, thanks in advance!
BILL