1 取字符串的前i個字符 str=str.Substring(0,i); // or str=str.Remove(i,str.Length-i); 2 去掉字符串的前i個字符: str=str.Remove(0,i); // or str=str.Substring(i); 3 從右邊開始取i個字符: str=str.Substring(str.Length-i); // or str=str.Remove(0,str.Length-i); 4 從右邊開始去掉i個字符: str=str.Substring(0,str.Length-i); // or str=str.Remove(str.Length-i,i);
新聞熱點
疑難解答