public boolean returnStringState(String string)
{
boolean result = true;
String bb = "";
int NumberCount = 0;
int StringCount = 0;
int NumberArray[] = {48,49,50,51,52,53,54,55,56,57};
for(int a =0; a<string.length(); a++)
{
for(int j =0; j<10; j++)
{
if(string.codePointAt(a)==NumberArray[j])
{
NumberCount+=1;
}else
{
StringCount+=1;
}
}
}
if(NumberCount>1 && ((StringCount-10)/10)>5 )
{
result = true;
}else
{
result = false;
}
// Log.d("deletefile", ""+NumberCount+","+(StringCount));
return result;
}
Ư¹®ÀÌ ¾²¿´´ÂÁö, ȤÀº ¿µ¹®ÀÎÁö ¾Ë±â À§Çؼ´Â À§ÀÇ
int NumberArray[] = {48,49,50,51,52,53,54,55,56,57};
ó·³ À¯´ÏÄڵ尪À» ¹è¿·Î ÀúÀåÇÏ¿© ½ºÆ®¸µ Çϳª¾¿ ºñ±³Çغ¸½Ã¸é µË´Ï´Ù.
Âü°í·Î string.codePointAt(a)<-´Â À¯´ÏÄڵ带 ¾ò¾î¿À´Â°ÍÀε¥, 48(0) ºÎÅͽÃÀÛÇؼ 57(9)±îÁö ÀÔ´Ï´Ù.
Ư¼ö¹®ÀÚó¸® °°Àº°ÍÀº »ó´çÈ÷ ¸¹Àº¾çÀÇ µ¥ÀÌÅ͸¦ ºñ±³Çϱ⠶§¹®¿¡ µÇµµ·ÏÀ̸é 󸮸¦ ¾ÈÇÏ½Ã´Â°Ô ÁÁ°í,
°¡ÀåÁÁÀº°ÍÀº ½ºÆ®¸µÀÌ ¿µ¾îÀÎÁö, ¼ýÀÚÀÎÁö¸¸ ±¸º°ÇØµÎ´Â°Ô ÁÁÀº°Å °°½À´Ï´Ù.
(·±Å¸ÀÓºñ±³½Ã°£Àº ±×´ÙÁö ±æÁö ¾Ê½À´Ï´Ù. ½Ã°£ º¹Àâµµ´Â O(10*log^n) ÀÔ´Ï´Ù.)
* ±ÛÀ» µî·ÏÇϽǶ§ ²À ÇÊ¿äÇÑ °æ¿ì°¡ ¾Æ´Ï¸é °³ÀÎÁ¤º¸¸¦ ³²±âÁö ¸¶¼¼¿ä ^^ (¿¬¶ôó,À̸ÞÀÏÁÖ¼Ò,Áֹεî·Ï¹øÈ£ µî)