A native .NET C# library for developing Matrix clients.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
508 B

using System;
using System.Collections.Generic;
using System.Text;
namespace MatrixDotNetLib
{
public class MatrixUtil
{
/// <summary>
/// Returns string with first letter capitalized
/// </summary>
/// <param name="s"></param>
/// <returns></returns>
public string UpperFirst(string s)
{
// Check for empty string.
if (string.IsNullOrEmpty(s))
{
return string.Empty;
}
// Return char and concat substring.
return char.ToUpper(s[0]) + s.Substring(1);
}
}
}