Search for multiple things in a string
- From: "tshad" <tscheiderich@xxxxxxxxxxxxxxx>
- Date: Tue, 13 Sep 2005 11:47:15 -0700
Can you do a search for more that one string in another string?
Something like:
someString.IndexOf("something1","something2","something3",0)
or would you have to do something like:
if ((someString.IndexOf("something1",0) >= 0) ||
((someString.IndexOf("something2",0) >= 0) ||
((someString.IndexOf("something3",0) >= 0))
{
Do something
}
Thanks,
Tom
.
- Follow-Ups:
- Re: Search for multiple things in a string
- From: Nicholas Paldino [.NET/C# MVP]
- Re: Search for multiple things in a string
- Prev by Date: Re: How to exit a For-Next in a nested Switch statement?
- Next by Date: Re: Best way to define 1D array of double in C# and pass it to and from a C dll.
- Previous by thread: Re: Optimizing C# String Processing
- Next by thread: Re: Search for multiple things in a string
- Index(es):
Loading