CSharp examples for System:String Case
Whether the first character of a string is upper cased. Info: if char = '0' or char = '.', IsUpper(char) = false.
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 a2s.c om*/ public class Main{ /// <summary> /// Whether the first character of a string is upper cased. /// Info: if char = '0' or char = '.', IsUpper(char) = false. /// </summary> public static bool IsFirstCharUpperCased(string input) { if (string.IsNullOrEmpty(input)) { return false; } return char.IsUpper(input.First()); } }