Added WithMaximumConsecutiveIdenticalCharacterOf method to prevent a certain number of consecutive identical characters