Ad
  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar
    using System.Text.RegularExpressions;
    using System;
    
    public class Kata
    {
      public static string Vowel2Index(string str)
      {
        string SwitcherooString = str;
        Regex vowels = new Regex(@"[aeiou]", RegexOptions.IgnoreCase);
        MatchCollection WhereThoseVowelsAt = vowels.Matches(str);
        foreach(Match match in WhereThoseVowelsAt)
        {
          SwitcherooString.Replace(match.Value,Convert.ToString(match.Index));
        }
        return SwitcherooString;
      }
    }
    

    Looks like it should work, but the Replace line isn't running at all. Any tips?

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    Fixed.

  • Custom User Avatar

    Author used 'Tests' variable in random tests but never used it. It's possible that the 'Tests' variable was intended for testing purposes, but as long as it doesn't impact the correctness of the code, you can safely ignore it.

  • Custom User Avatar

    I have the same issue due to this i am unable to solve this kata...

    This is a warning, not an error, it is not the source of whatever issue you are encountering.

  • Custom User Avatar

    So your code isn't working due to this error?
    Mine worked just fine, it just had that error as well.
    Didn't seem to affect it at all, though, so I submitted it anyways.

  • Custom User Avatar

    I have the same issue due to this i am unable to solve this kata...

  • Custom User Avatar

    Not only that but I popped it into Visual Studio and it says it should run just fine (no StartIndex error)
    What gives?

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    I thought it was pretty easy as well, and I did C#

    Though I suppose it's up to the mods. They've been on this site longer, they're probably better at gauging difficulty than we are

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    Completed kata just fine, but recieved this warning when doing random tests:

    tests/Fixture.cs(37,17): warning CS0219: The variable 'Tests' is assigned but its value is never used

    Marking as possible issue, but it could be totally inconsequential

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    It should be. I took all the code in the box and pasted it onto the doc as is.

    Although, I didn't try to paste it into Visual Studio to confirm if anything was wrong with the formatting.

    About the Markdown boxes, I assumed they weren't used since parts of my code were indeed being placed in markdown without my input and I assumed that if it was working the entire thing would go into a markdown box automatically.

  • Loading more items...