First page Back Continue Last page Overview Graphics
字串緩衝器類別
String 類別是唯讀的,StringBuffer 類別則可以讀寫
 
StringBuffer astr="This is a test!";
拷貝字串:astr.getChars()
 
反向排列字串: astr.reverse();
 
修改字串:astr.setCharAt(index,ch);
 
附加文字:astr.append();
 
插入、刪除:astr.insert(), astr.delete()
 
轉成String:astr.toString();