Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Hello, My Code passed Every test but one the extra test,even though i tested it in visual studio and it works fine, i used c#,here is the issue:
Extra Tests
Test Failed
String lengths are both 46. Strings differ at index 21.
Expected: "wha1t sh2all 3we d4o w5ith a6 dru7nken s8ailor"
But was: "wha1t sh2all 3we d4o a6 w5ith dru7nken s8ailor"
-how can i fix it?
Thank You Very Much
It's true, you cannot do
c.ToUpper()
, but you can doChar.ToUpper(c)
. See https://learn.microsoft.com/en-us/dotnet/api/system.char?view=net-8.0#methods to see what's available withchar
datatype. Also, be vary of typos, all methods in C# start with uppercase.sorry about that, here is the errors im getting regarding the problem :
src/Solution.cs(10,17): error CS1061: 'char' does not contain a definition for 'isLower' and no accessible extension method 'isLower' accepting a first argument of type 'char' could be found (are you missing a using directive or an assembly reference?)
src/Solution.cs(11,29): error CS1501: No overload for method 'ToUpper' takes 0 arguments
src/Solution.cs(12,25): error CS1061: 'char' does not contain a definition for 'isUpper' and no accessible extension method 'isUpper' accepting a first argument of type 'char' could be found (are you missing a using directive or an assembly reference?)
Hi. First of all, you should mention which language you're working with, and probably add your code too. Because I already solved this kata in C#, I can see your code, so... The problem is that
string
in C# is immutable. You need to create a new modified string. Also, the function signature expects you to return a new string, but it doesn't look like you returned anything.why Char methods dont work in here
thank you very much.
Not that one, maybe it's
using System.Linq
the one you missed.u mean using System its there but for some reason its not detecting the array Methods
Maybe you're missing some
using
there?why i cant use array methods in here?, im using C#.