I have a string I keep appending too upto certain amount of chars.
Is there some sort of way for me to check the string to see if I hit my limit of repeatable characters?
For example, assume I allow for 2 repeatable chars, this will be a valid
string Xxh03dhJUX, so I can append the last capital X to the string.
Since I allow for 2 repeatable characters in the string this would be an invalid string Xxh03dhJUXX (note the 3 capital X's).
The repeatable chars value will apply for all characters in the string and I obviously want to do the check before appending to the string. I think I would need a function that returns 0 for append 1 don't append would be the way to go.
Any ideas, suggestions or examples of code would be greatly appreciated.
Thanks in advance to all that answer.