﻿ 
    String.prototype.trim = function(){

        return this.replace( /(^\s*)|(\s*$)/g, '');
        
    }

    String.prototype.cutting = function( length){

        var stream = this;
        
        if( stream.length > length) stream = stream.substring( 0, length) + ' ...';
       
        return stream;
    
    }
    
    String.prototype.nonsecond = function(){

        var stream = this.substring( 0, this.length - 3);
       
        return stream;
    
    }
    
    function StringBuffer(){
        
        this.__strings__ = new Array();
    
    }
    
    StringBuffer.prototype.append = function( string){
        
        this.__strings__.push( string);
    
    };
    
    StringBuffer.prototype.toString = function(){
    
        return this.__strings__.join('');
    
    };
            
