--------------------------------------- ¼Ò ½º ÄÚ µå ---------------------------------------
String str = "ice cream";
Log.v("String", "Ãâ·Â : " + str); ==> Ãâ·Â : ice cream
str = str.replaceAll(\\p{space}, "");
Log.v("String", "Ãâ·Â : " + str); ==> Ãâ·Â : icecream
-------------------------------------------------------------------------------------------
À§ÀÇ ¼Ò½º´Â ¼¹ö·Î ºÎÅÍ ID¸¦ º¸³¾¶§ °ø¹é¾øÀÌ º¸³»¾î ó¸®Çϱâ À§ÇØ »ç¿ë, ¶Ç´Â ã°íÀÚ ÇÏ´Â File¸íÀÇ ResourceÀÇ ID¸¦ ¾ò±âÀ§ÇØ °ø¹éÀ» ¾ø¾Ö´Â ±â´ÉÀ¸·Î »ç¿ëµË´Ï´Ù.
String¿¡ ¸Þ¼µå Áß¿¡ trim()À̶õ ¸Þ¼µå°¡ ÀÖ½À´Ï´Ù.
trim()Àº StringÀÇ ¸Ç¾Õ°ú ¸ÇµÚÀÇ °ø¹éÀ» ¾ø¾ÖÁÖ´Â °ÍÀä. Àú´Â ±×°Íµµ ¸ð¸£°í StringÀÇ °ø¹éÀ» ¾ø¾ÖÁÖ´Â ¸Þ¼µåÀÎÁÙ ¾Ë°í »ç¿ëÀ» Çß´Ù°¡ ¸¹Àº error¸¦ º¸°í ¸»¾ÒÁÒ.
°ø¹éÀ» ¾ø¾Ö±â À§Çؼ± String¿¡¼ replaceAll()°ú Á¤±Ô½ÄÀ» ÀÌ¿ëÇÏ¿© while¹®À» »ç¿ëÇÏÁö ¾Ê°í(¾î¶»°Ôµç Çغ¸¸é while¹®À¸·Î ó¸®ÇÒ ¼ö ÀÖ½À´Ï´Ù.) ±ò²ûÇÏ°Ô String¿¡¼ Áß°£¿¡ ÀÖ´Â °ø¹éÀ» Á¦°ÅÇÒ ¼ö ÀÖ½À´Ï´Ù.