programing

문자열에서 처음 3자 제거

powerit 2023. 9. 10. 13:08
반응형

문자열에서 처음 3자 제거

문자열의 처음 3자를 제거하는 가장 효율적인 방법은 무엇입니까?

예를 들어,

apple'을 'le'로 바꿉니다.a cat를 at로 바꿈' bc'를 'bc'로 바꿈

부분 문자열만 사용합니다."apple".substring(3);돌아올 것입니다le

String 클래스하위 문자열 메서드를 사용합니다.

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

언급URL : https://stackoverflow.com/questions/5131867/removing-the-first-3-characters-from-a-string

반응형