Click here to Skip to main content
15,907,905 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
string actualString = " FORMATTED, NOT INSTALLED,121212Y,NOTINSTALLED,FORMATTED,FORMATTED";
string searchString ="NOT INSTALLED";


How to check the how many times string has occured other than searchString in actualString.
Posted
Updated 19-May-11 20:53pm
v3
Comments
OriginalGriff 20-May-11 2:59am    
Sorry, that doesn't make a lot of sense.
It sounds as if you trying to find out how many times a string doesn't occur in another!
Sergey Alexandrovich Kryukov 20-May-11 21:07pm    
You will be laughing, but this is exactly it. Ha ha. :-)
--SA

1 solution

This may help. Its just an additional method that you will add to your code.

http://www.dotnetperls.com/string-occurrence[^]
 
Share this answer
 
Comments
Tarun.K.S 20-May-11 3:34am    
That should help. 5+
walterhevedeich 20-May-11 4:01am    
Thanks.
Sergey Alexandrovich Kryukov 20-May-11 21:07pm    
Agree, it makes a 5.
--SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900