1 取字符串的前i個(gè)字符 str=str.Substring(0,i); // or str=str.Remove(i,str.Length-i); 2 去掉字符串的前i個(gè)字符: str=str.Remove(0,i); // or str=str.Substring(i); 3 從右邊開始取i個(gè)字符: str=str.Substring(str.Length-i); // or str=str.Remove(0,str.Length-i); 4 從右邊開始去掉i個(gè)字符: str=str.Substring(0,str.Length-i); // or str=str.Remove(str.Length-i,i);
|
新聞熱點(diǎn)
疑難解答
圖片精選
網(wǎng)友關(guān)注