First page Back Continue Last page Overview Graphics
字串的相關函數
String str="This is a test!";
字串長度:str.length();
 
取出第i個字元:str.charAt(i);
 
拷貝字串:str.getChars(scrBegin,SceEnd,char dest[],destBegin);
 
字串尋找:indexOf();  
 
字串比較:compareTo(),equals();
 
取子字串:substring(int beg,int end), substring(int beg)