nl_tokens: * @method each ( [ search ] = single character [ fn ] ) @returns Array @short Runs callback [ fn ] against each occurence of [ search ] . @extra Returns an array of matches . [ search ] may be either a string or regex and defaults to every character in the string . @example
pl_tokens: function ( search , fn ) { var match , i , len ; if ( isFunction ( search ) ) { fn = search ; search = / [\s\S] / g ; } else if ( ! search ) { search = / [\s\S] / g } else if ( isString ( search ) ) { search = regexp ( escapeRegExp ( search ) , 'gi' ) ; } else if ( isRegExp ( search ) ) { search = regexp ( search . source , getRegExpFlags ( search , 'g' ) ) ; } match = this . match ( search ) || [ ] ; if ( fn ) { for ( i = 0 , len = match . length ; i < len ; i ++ ) { match [ i ] = fn . call ( this , <mask> [ i ] , i , match ) || match [ i ] ; } } return match ; }