• Custom User Avatar

    Ah! I see what you did there you cheeky fella

  • Custom User Avatar

    I am chill even though it may not mean nothing to yall

  • Custom User Avatar

    Damn he seems like a chill guy

  • Custom User Avatar
  • Custom User Avatar

    wowzers this was a doozy tried usigng soem weird list stuff first but then my good freiend @ItMayNotMeanNothingToYall came in and helped

    arigatou my codewars nakama

  • Custom User Avatar

    re-raised there

  • Custom User Avatar

    re-raised there with more details

  • Custom User Avatar

    the handling of acronyms / consecutive capital letters such as "requestHTTP" is not clear: should it be "request H T T P" or "request HTTP" ? the description should either specify it, or rule out 1-letter words

  • Custom User Avatar

    yes there is a mistake i missed, the bound of your for loop is incorrect, it refers to the length of the output, not of the input, so you loop out of bounds

  • Custom User Avatar

    oh, got it now. thank you very much!

    (ok, i corrected it like you said but still crashed in the same way.)

  • Custom User Avatar
    • you are missing 1 byte for the nul-terminator there:
      char *str = calloc(strLen, sizeof(char));
    
    • you are misunderstanding the contract of the is____() functions from <ctype.h>. the only guarantee is that they return a nonzero value if the character passes the predicate, and 0 otherwise. The nonzero value could be -42, 666, 1 etc.; it's an implementation detail that should not be relied upon. So:
      if(isupper(camelCase[i]) > 0) count++;
      
      should be:
      if(isupper(camelCase[i])) count++;
      
  • Custom User Avatar

    Everything worked with the CoreTests, but on the Random Tests it crashed: "Caught unexpected signal: 6". I printed both my input & output strings, and the output for the Random Tests is 100% correct. Don't really know what to do. (The language is C)

  • Custom User Avatar

    I do not know if the "consecutiveCApitals" should be considered a camel case or not, but in my opinion such kind of inputs should have been given in the Description accompanying the kata.

  • Custom User Avatar

    @rowcased and @BobtheLantern, thank you! your comments allowed me to complete the kata!

  • Custom User Avatar

    The assertion message says 'consecutive CApitals' should equal 'consecutive C Apitals'

    That means your function returned consecutive CApitals, but it should have returned consecutive C Apitals, notice the space between the C and A in the expected return value?

    You can see the input by printing it inside your code. In this case you can just add print(s) as the first line of code in your function.

  • Loading more items...