¡@

Home 

c# Programming Glossary: currentrun

Testing for repeated characters in a string

http://stackoverflow.com/questions/829537/testing-for-repeated-characters-in-a-string

text if text.Length 0 return 0 char current text 0 int currentRun 1 int bestRun 0 for int i 1 i text.Length i if current text.. i 1 i text.Length i if current text i bestRun Math.Max currentRun bestRun currentRun 0 current text i currentRun It's possible.. i if current text i bestRun Math.Max currentRun bestRun currentRun 0 current text i currentRun It's possible that the final run..