7 kyu
Split string by multiple delimiters
392 of 691zofy
Loading description...
Fundamentals
Algorithms
Arrays
Strings
Logic
View
This comment has been reported as {{ abuseKindText }}.
Show
This comment has been hidden. You can view it now .
This comment can not be viewed.
- |
- Reply
- Edit
- View Solution
- Expand 1 Reply Expand {{ comments?.length }} replies
- Collapse
- Spoiler
- Remove
- Remove comment & replies
- Report
{{ fetchSolutionsError }}
-
-
Your rendered github-flavored markdown will appear here.
-
Label this discussion...
-
No Label
Keep the comment unlabeled if none of the below applies.
-
Issue
Use the issue label when reporting problems with the kata.
Be sure to explain the problem clearly and include the steps to reproduce. -
Suggestion
Use the suggestion label if you have feedback on how this kata can be improved.
-
Question
Use the question label if you have questions and/or need help solving the kata.
Don't forget to mention the language you're using, and mark as having spoiler if you include your solution.
-
No Label
- Cancel
Commenting is not allowed on this discussion
You cannot view this solution
There is no solution to show
Please sign in or sign up to leave a comment.
Time: 549ms Passed: 8Failed: 1Exit Code: 1 Test Results: Test Passed Test Passed Test Passed Test Passed Test Passed [] should equal ['some strange string'] Test Passed Test Passed Test Passed i couldn't fix that
In Python, mutable default should be avoided.
This comment has been hidden.
JS: Node v12 should be used along with its appropiate assertion tools (Mocha + Chai). Refer to this and this
['some', 'strange', 'string'] should equal ['some strange string'] ['1', '2', '3'] should equal ['1+2', '-', '3']
I think there is something wrong with those tests in python
Not a kata issue, check what the delimiters value is.
This comment has been hidden.
That's exactly your problem, you should be using them.
thanks alot I'll fix it
No random tests.
Are the delimiters guaranteed to be 1 character long?
No, delimiters Can consist of more characters.
I see some Python solutions assuming they can't, there're no tests against that.
I don`t know what you mean...
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
Function name for javascript version should be lowerCamelCase not snake case
Yeah, thanks for remark.
Should
very\quickly
bevery\\quickly
in the example test case since \q is an escaped q or what am i missing?"very\quickly".split("\\") => ['veryquickly']
and"very\\quickly".split("\\") => ['very','quickly']
It`s good as it is:
owade is correct, your initial tests have
'very\quickly'
Sorry, I didn`t see it. Now it should be correct.
Hi..., function name for initial code is missing... no great problem, but should be corrected;-)!
Thanks, name added.