Dev.Stroy/Android

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

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
반응형