- Home
- .NET coding challenges
- Removing the last character from a string
Removing the last character from a string
This coding challenge involves you to remove the last character from a string.
It involves writing a RemoveLastCharacter
function, passing in the string as a parameter.
Begin with this function:
public class StringFunctions
{
public string RemoveLastCharacter(string value)
{
}
}
Now go ahead and write some code that will return the value without it's last character.
Give us your anonymous feedback regarding this page, or any other areas of the website.
Related challenges
Write a C# function to convert MPH to KPH
Take our coding challenge to write a C# function with the necessary parameters that converts miles-per-hour (MPH) to kilometres-per-hour (KPH) and vice-versa.
Contains online code editor
Convert hours, minutes and seconds into a time formatted string
Pass in the hours, minutes and seconds into a method and get it to return a time formatted string which should include leading zeros.
Contains online code editor