/*

    string.js
    
    Algunas funciones para ampliar las que nos ofrece por defecto
    el objeto String de Javascript.

    Copyright (c) 2005 - Formauri, S.L. - Todos los derechos reservados.
    <http://www.formauri.es/>

*/


/* Funciones que quitan espacios al principio, al final, o a ambos
   lados de una cadena, añadiéndose como métodos del objeto String */

function strltrim()
{
  return this.replace(/^\s+/,'');
}

function strrtrim()
{
  return this.replace(/\s+$/,'');
}

function strtrim()
{
  return this.replace(/^\s+/,'').replace(/\s+$/,'');
}


String.prototype.ltrim = strltrim;
String.prototype.rtrim = strrtrim;
String.prototype.trim = strtrim;


