상세 컨텐츠

본문 제목

substring, lastIndexOf 활용해 마지막 폴더(디렉토리)명만 가져오기

Dev.Stroy/Android

by zNine 2014. 8. 12. 14:50

본문

728x90
반응형



String fullPath = "/storage/sdcard0/Music/2NE1/";

String lastPath =  fullPath.substring(fullPath.lastIndexOf("/")+1, fullPath.length());


String 관련 API는 다다익선!!

728x90
반응형

관련글 더보기