刪除字符串的前3個字符的最有效方法是什麼?刪除字符串中的前3個字符
例如:
'apple' change to 'le' 'a cat' change to 'at' ' a b c'change to 'b c'
刪除字符串的前3個字符的最有效方法是什麼?刪除字符串中的前3個字符
例如:
'apple' change to 'le' 'a cat' change to 'at' ' a b c'change to 'b c'
只需使用字符串:"apple".substring(3);
將返回String類的le
是的,它的工作.. – 2014-02-14 13:12:33
使用子方法:
string.substring(3);
你應該學習[String in Java]的基礎知識(http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html)。 – 2011-02-27 06:52:31
可能重複[在Java中,刪除字符串的第一個字符](http://stackoverflow.com/questions/4503656/in-java-removing-first-character-of-a-string) – 2014-02-11 15:14:30
請在搜索之前先搜索的問題。以前肯定有這樣一個基本問題。 – 2014-02-11 15:14:59