src/fn/string.js
/**
     * Shortens the given string after *len* characters.
     *
     * Provides an abbreviation to the string passed as the first argument,
     * deciding through the second argument the number of characters to keep and the remainder replaced
     * by what is passed as the third argument and if not given a defalut it is: '...'
     *
     * @method   shorten
     * @global
     *
     * @example
     * ```javascript
     * //"test***"
     * bbn.fn.shorten('testing', 4, '***');
     * ```
     *  @example
     * ```javascript
     * //"test..."
     * bbn.fn.shorten('testing', 4);
     * ```
     * @memberof bbn.fn
     * @param    {String} st
     * @param    {Number} len
     * @returns  {String}
     */
Shortens the given string after *len* characters.
Provides an abbreviation to the string passed as the first argument,
deciding through the second argument the number of characters to keep and the remainder replaced
by what is passed as the third argument and if not given a defalut it is: '...'

@method   shorten
@global


Shortens the given string after * len * characters . Provides an abbreviation to the string passed as the first argument deciding through the second argument the number of characters to keep and the remainder replaced by what is passed as the third argument and if not given a defalut it is : ' ... ' @method shorten @global
shorten(st, len, adj){
      if ( typeof(st).toLowerCase() === 'string' ){
        if ( !len ){
          len = bbn.var.shortenLen;
        }
        if ((adj === undefined) || !bbn.fn.isString(adj)) {
          adj = '...';
        }
        if ( st.length > len ){
          st = bbn.fn.substr(st, 0, len) + adj;
        }
      }
      return st;
    }
shorten ( st , len , adj ) { if ( typeof ( st ) . toLowerCase ( ) === 'string' ) { if ( ! len ) { len = bbn . var . shortenLen ; } if ( ( adj === undefined ) || ! bbn . fn . isString ( adj ) ) { adj = '...' ; } if ( st . length > len ) { st = bbn . fn . substr ( st , 0 , len ) + adj ; } } return st ; }
Shortens the given string after *len* characters.
Shortens the given string after * len * characters .