c# - loop through an array and find partial string -


If I have an array

array [0] = "jack"; Array [1] = "jill"; Array [2] = "Lisa"; Array [2] = "jackie";

And I want to find all the elements of "ack" in it.

In this case it will come back

"Jack", "Jackie"

What is the fastest way to do this?

  array. Where (s = & gt; s.Contains ("ack"));  

(Gladly ignoring any localization / string collation / case sensitivity issues.)


Comments

Popular posts from this blog

MySql variables and php -

url rewriting - How to implement the returnurl like SO in PHP? -

Which Python client library should I use for CouchdB? -