Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
583 people understood this description and solved the kata without problems.
I also understand it. So where is your problem?
Agree with pre, the description does not explain what is requested properly. Examples therefore contradict each other. Wasted time trying to code for something that was not described correctly.
Thanks, I figured it out after much trial and error. I suggest changing the description from "Write a method, that replaces every nth char oldValue with char newValue."
to
"Write a method that replaces every nth occurence of char oldValue with char newValue. That is, every nth time oldValue appears, not every nth character in text"
Hopefully makes it less confusing. The extra line counting the nth occurrences helps a lot -- please consider changing that slightly: "Pos 2 and 4 are replaced"
to
"2nd and 4th occurence are replaced"
Finally, typo down little lower: "casesensitive" should be case sensitive :)
I added an extra line in the example. :-)
You should replace every nth char. NOT ONLY beginning at the nth char.
"Abcabcabcabc", 2, 'b', '' -> "Abcacabca*c"
-> The 2nd and the 4th 'b' are replaced.
Hope now, it is clearer. :-)
My problem exactly. I have code working for ever Nth character, but Vader should be replaced too (?)
Expected: 'Vader soid: No, I am your fother!', instead got: 'Voder soid: No, I am your fother!'