Ad
  • Default User Avatar

    While writing the code I was expalining it to a friend he asked questions I then answered with the comments.
    In retrospect, it is a bit too much, you are right. I need to learn how synthesize my thoughts better.

    Either way, thank you very much for your feedback, and for reading my code.

  • Default User Avatar

    Good point. This solutions does not correctly handle upper camel case.

    The test_solution_randomly function strips the uppercase letter from the start of the sentence with:

                sentence.push_str(&word_selection.next().unwrap()[1..]);
    

    So I take it this problem is only intended for lower camel case.

    The problem statement should probably be made to be more specific.

    I see someone already reported the issue:

    https://www.codewars.com/kata/5208f99aee097e6552000148/discuss/rust#6181ac3bac59440057e75f57

  • Default User Avatar

    Lol I don't blame you. It is very confusing, even to myself when I'm trying to understand what I wrote a year ago.

    I would never write this kind of code for production. What happens on CodeWars stays on CodeWars or something, I guess.