Exemplo n.º 1
0
        public static string Capitalize([NotNull] this string s, [NotNull] CultureInfo culture)
        {
            s.CheckArgumentNull(nameof(s));
            culture.CheckArgumentNull(nameof(culture));
            if (s.Length == 0)
            {
                return(s);
            }
            var chars = s.ToCharArray();

            chars[0] = culture.TextInfo.ToUpper(chars[0]);
            return(new string(chars));
        }
Exemplo n.º 2
0
 public ExcelConverter(CultureInfo excelCulture) : this()
 {
     excelCulture.CheckArgumentNull("ExcelConverter.Constructor excelCulture");
     _excelCulture = excelCulture;
 }