本文实例讲述了C#使用正则表达式实现首字母转大写的方法。分享给大家供大家参考,具体如下:
class Program
{
static void Main(string[] args)
{
// Input strings.
const string s1 = samuel allen;
const string s2 = dot net perls;
const string s3 = Uppercase first letters of all words in the
话不多说,上代码:
List list = new ArrayList(){
{
// list初始数据
addAll(Arrays.asList(puyuma0216puyuma.split()));//将数组转化为list
add(puyuma);
add(0216);
add(puyuma0216) ;
}
};
System.out.println(list初始数据: + list);
Pat