问题

删除字符串前3个字符的最有效方法是什么?

例如:

'apple' change to 'le'  
'a cat' change to 'at'  
' a b c'change to 'b c'

#1 热门回答(233 赞)

只需使用子字符串:"apple".substring(3);将返回le


#2 热门回答(8 赞)

使用String类的substring方法:
string.substring(3);


#3 热门回答(6 赞)

使用String类的substring方法:

String removeCurrency=amount.getText().toString().substring(3);

原文链接