• Sign Up
    Time to claim your honor
  • Training
  • Practice
    Complete challenging Kata to earn honor and ranks. Re-train to hone technique
  • Freestyle Sparring
    Take turns remixing and refactoring others code through Kumite
  • Community
  • Leaderboards
    Achieve honor and move up the global leaderboards
  • Chat
    Join our Discord server and chat with your fellow code warriors
  • Discussions
    View our Github Discussions board to discuss general Codewars topics
  • About
  • Docs
    Learn about all of the different aspects of Codewars
  • Blog
    Read the latest news from Codewars and the community
  • Log In
  • Sign Up
curiousrabbit Avatar
Name:Rachael
Clan:Founders & Coders
Member Since:Feb 2016
Last Seen:Mar 2019
Profiles:
Following:216
Followers:211
Allies:211
View Profile Badges
  • Stats
  • Kata
  • Collections
  • Kumite
  • Social
  • Discourse
  • Conversations (17)
  • Replies
  • Authored
  • Needs Resolution
  • Custom User Avatar
    • samon
    • commented on "Character limits: How long is your piece of string?" kata
    • 17 months ago

    snake case +1

  • Custom User Avatar
    • ejini战神
    • resolved an issue on "Character limits: How long is your piece of string?" kata
    • 2 years ago

    fixed in latest fork

  • Custom User Avatar
    • ejini战神
    • resolved a suggestion on "Character limits: How long is your piece of string?" kata
    • 2 years ago

    Approved

  • Custom User Avatar
    • saudiGuy
    • created a suggestion for "Character limits: How long is your piece of string?" kata
    • 2 years ago

    python new test framework + snake_case is required. updated in this fork

  • Custom User Avatar
    • FArekkusu
    • created an issue for "Character limits: How long is your piece of string?" kata
    • 5 years ago

    The function name in Python should be in snake_case.

  • Custom User Avatar
    • curiousrabbit
    • commented on "Character limits: How long is your piece of string?" kata
    • 8 years ago

    thanks for the feedback - and the suggestion for a future kata. Will get working on it!

  • Custom User Avatar
    • Blind4Basics
    • created a suggestion for "Character limits: How long is your piece of string?" kata
    • 8 years ago

    The output string seems a bit not logical when spaces == False: if spaces are not counted, the truncated output should contain mx characters AND all the spaces before that limit.

    That would make the kata a bit more interesting... ;) (of course, this would invalidate lots of solutions. You could write a new verison this way and link the two between themselves, in their descriptions).

  • Custom User Avatar
    • curiousrabbit
    • commented on "Character limits: How long is your piece of string?" kata
    • 8 years ago

    done - thanks again :)

  • Custom User Avatar
    • user62875
    • commented on "Character limits: How long is your piece of string?" kata
    • 8 years ago

    I enjoyed this, thanks.

  • Custom User Avatar
    • appleJax
    • commented on "Character limits: How long is your piece of string?" kata
    • 8 years ago

    Yes, the description is better now! Couple of suggestions to clarify things even more:

    1. Modify the last line to say: When the spaces argument is False, you should remove spaces from the "Answer".
    2. Move that line above the examples.
  • Custom User Avatar
    • curiousrabbit
    • commented on "Character limits: How long is your piece of string?" kata
    • 8 years ago

    Good spot - thanks! I've updated the examples, hope the description makes more sense now.

  • Custom User Avatar
    • appleJax
    • commented on "Character limits: How long is your piece of string?" kata
    • 8 years ago

    Overall, cool kata! I'm still a little confused about when to delete spaces from the input text though. That should be explained better in the description. Is the second example-response in the description correct?

    charCheck("Cara Hertz", 9, false) should return [ true, "Cara Hertz" ]
    Seems like it should return [ true, "CaraHertz" ] according to the actual test cases.

    I'm still not sure though, more clarification in the description would be helpful.

  • Custom User Avatar
    • JohanWiltink
    • commented on "Character limits: How long is your piece of string?" kata
    • 8 years ago

    I had to update my solution and only now actually read the test cases. Great! :]

    Also, changed vote and approved. Make more!

  • Custom User Avatar
    • curiousrabbit
    • resolved a suggestion on "Character limits: How long is your piece of string?" kata
    • 8 years ago

    Thank-you for taking the time to explain this. I've updated the kata according to your suggestion.

  • Custom User Avatar
    • JohanWiltink
    • created a suggestion for "Character limits: How long is your piece of string?" kata
    • 8 years ago

    Returning inconsistent datatypes is ++Ungood™ and should be avoided.

    You could just as easily have the function return [ true, "original string" ], [ true, "" ] or even just [ true ] instead of true. That would enable you to always process the Boolean return value as answer[0]. As it is, the function always returns a truthy value and you need to Array.isArray() (or equivalent) the return value to find out whether or not to further process it. Which is senseless.

  • Loading more items...
  • © 2025 Codewars
  • About
  • API
  • Blog
  • Privacy
  • Terms
  • Code of Conduct
  • Contact

Confirm

  • Cancel
  • Confirm

Collect: undefined

Loading collection data...