Lowercased the first letter of a string - CSharp System

CSharp examples for System:String Case

Description

Lowercased the first letter of a string

Demo Code


using System.Threading.Tasks;
using System.Text.RegularExpressions;
using System.Text;
using System.Net.Mail;
using System.Linq;
using System.Globalization;
using System.Collections.Generic;
using System;//  w  w w . j a  v a 2  s .  co  m

public class Main{
        /// <summary>
        /// Lowercased the first letter of a string
        /// </summary>
        public static string LowerFirstLetter(string input)
        {
            if (string.IsNullOrEmpty(input))
            {
                return input;
            }

            return char.ToLower(input.First()) + input.Substring(1);
        }
}

Related Tutorials