Searching the first few characters of every word within a string in C#
Posted
by
user1704669
on Stack Overflow
See other posts from Stack Overflow
or by user1704669
Published on 2012-09-27T21:33:47Z
Indexed on
2012/09/27
21:37 UTC
Read the original article
Hit count: 161
c#
|wordsearch
I am new to Programming languages. I have a requirement where I have to return a record based on a search string.
For e.g. I am having the following 3 records and my search string is 'Cal'
1)University of California
2)Pascal Institute
3)California University
If I try string.Contains, all 3 are returned. If I try string.starts-with, I get only 3 but my requirement is I need #1 and #3 in the result.
Thank you for your help.
-Joel
© Stack Overflow or respective owner