//判断字符串是否包含某个字符串
string str="hello";
bool str1=str.Contains ("el"+"h");
Console.WriteLine (str1);
//以某一个字符串结尾
str.EndsWith("o");
//以某个字符串开头
str.StartsWith("h");
//向右对齐
string newstr = str.PadLeft (15);
Console.WriteLine (newstr);
// string str1 = "China";
// Console.WriteLine (str1.PadLeft(15));
//字符串替换
string str3=str.Replace("hello","world");
Console.WriteLine (str3);
string str4 = str.ToUpper ();
Console.WriteLine (str4);
char shr=(char)107;
Console.WriteLine (shr);
string str="hello";
bool str1=str.Contains ("el"+"h");
Console.WriteLine (str1);
//以某一个字符串结尾
str.EndsWith("o");
//以某个字符串开头
str.StartsWith("h");
//向右对齐
string newstr = str.PadLeft (15);
Console.WriteLine (newstr);
// string str1 = "China";
// Console.WriteLine (str1.PadLeft(15));
//字符串替换
string str3=str.Replace("hello","world");
Console.WriteLine (str3);
string str4 = str.ToUpper ();
Console.WriteLine (str4);
char shr=(char)107;
Console.WriteLine (shr);