Instructions
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.
My Solution
using System;
public class Kata
{
public static string Remove_char(string s)
{
// Your Code
return s.Substring(1, s.Length - 2);
}
}
- c# Substring 메서드를 사용하면 쉽게 해결 가능
Best Practices
using System;
public class Kata
{
public static string Remove_char(string s)
{
return s.Substring(1,(s.Length - 2));
}
}
- 똑같은 방식으로 해결