What is the most efficient way to detect if a string contains a of number of consecutive duplicate c

Posted by silent on Stack Overflow See other posts from Stack Overflow or by silent
Published on 2010-04-19T21:59:40Z Indexed on 2010/04/19 22:03 UTC
Read the original article Hit count: 126

Filed under:
|

For example, a user entered "I love this post!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"

the consecutive duplicate exclamation mark "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" should be detected.

© Stack Overflow or respective owner

Related posts about c#

Related posts about string-manipulation