
/**
* ÁÂ¿ì °ø¹é Á¦°Å
*/
String.prototype.trim = function()
{
return this.replace(/(^\s*)|(\s*$)/g, "");
}

/**
* ÅØ½ºÆ® ÁÂÃø ºÎºÐÀÇ °ø¹é °¹¼ö
*/
String.prototype.leftSpaceQuantity = function()
{
var count = 0;

for( i = 0; i < this.length; i++ )
{
if( this.charAt(i) == ' ' )
count++;
else
break;
}

return count;
}

/**
* ÅØ½ºÆ® ¿ìÃø ºÎºÐÀÇ °ø¹é °¹¼ö
*/
String.prototype.rightSpaceQuantity = function()
{
var count = 0;

for( i = this.length - 1; i >= 0; i-- )
{
if( this.charAt(i) == ' ' )
count++;
else
break;
}

return count;
}
