Count the number of times a string appears within a string...

Posted by onekidney on Stack Overflow See other posts from Stack Overflow or by onekidney
Published on 2010-06-10T16:48:11Z Indexed on 2010/06/10 16:53 UTC
Read the original article Hit count: 203

Filed under:
|
|

I simply have a string that looks something like this:

"7,true,NA,false:67,false,NA,false:5,false,NA,false:5,false,NA,false"

All I want to do is to count how many times the string "true" appears in that string. I'm feeling like the answer is something like String.CountAllTheTimesThisStringAppearsInThatString() but for some reason I just can't figure it out. Help?

© Stack Overflow or respective owner

Related posts about c#

Related posts about string