I agree. I interpret "you don't have to worry with strings with less than two characters" to mean "if a string has less than two characters, do not modify it." This understanding implies that you must ensure that you do not modify strings if they contain only one character, which requires a check. If they meant "all strings passed in will have at least 2 characters," they should have said that.
When I print the string, I put single quotation marks into the string.
The issue is fixed by removing the single quotation marks in the string returned.
Description:
It's pretty straightforward. Your goal is to create a function that removes the first and last characters of a string. You're given one parameter, the original string. You don't have to worry with strings with less than two characters.
So most voted answers dont check for strings with less than two characters thou!!
Not working?
I agree. I interpret "you don't have to worry with strings with less than two characters" to mean "if a string has less than two characters, do not modify it." This understanding implies that you must ensure that you do not modify strings if they contain only one character, which requires a check. If they meant "all strings passed in will have at least 2 characters," they should have said that.
Ok, thanks. Its difficult to come up with a new one it seems
Duplicate of https://www.codewars.com/kata/valid-braces
Unpublished now. Next time I will check a little more. Thanks for helping me
Yes you should ;-)
Crumbs, I did have a look to see if it was duplicate. Obviously not deeply enough! Do I remove it now?
A duplicate of http://www.codewars.com/kata/get-the-excel-column-title
When I print the string, I put single quotation marks into the string.
The issue is fixed by removing the single quotation marks in the string returned.
congrats. I tried to print out the list and got the same required result. Then, I use return statement, but I still got the error:
Must work with many names: "'Bart, Lisa, Maggie, Homer & Marge'" should equal 'Bart, Lisa, Maggie, Homer & Marge'
Do you have any idea to fix the issue? Thank you
Description:
It's pretty straightforward. Your goal is to create a function that removes the first and last characters of a string. You're given one parameter, the original string. You don't have to worry with strings with less than two characters.
So most voted answers dont check for strings with less than two characters thou!!
Glad I finaly did this one. Accessing the name field was a nightmare until I worked it out LOL