If I have to find let's say a word in a sentence, i can think of two approaches
Which one is better in terms of performance or best practice
If it's fairly straightforward to do something without regex, it's almost always cheaper that way. String.IndexOf
(or String.Contains
) is definitely an example of this.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With