public void UpperFirstLetter()
        {
            //开头是一个字母或者空格后的第一个字母
            string pattern = @"\b(\w)|\s(\w)";

            string input = "i am a smart lady ";

            string output= Regex.Replace(input, pattern, match =>
            {
                return match.Value.ToUpper();
            });

            MessageBox.Show(output);


        }

相关文章:

  • 2022-12-23
  • 2021-10-01
  • 2021-11-22
  • 2022-01-31
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-02-07
猜你喜欢
  • 2022-01-30
  • 2021-05-31
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案