nl_tokens: Collapse repeated character sequences .
pl_tokens: function collapse ( str , ch ) { var res = str . split ( ch ) ; var isFirst = res [ 0 ] === '' ; var isLast = <mask> [ res . length - 1 ] === '' ; res = res . filter ( Boolean ) ; if ( isFirst ) res . unshift ( '' ) ; if ( isLast ) res . push ( '' ) ; return res . join ( ch ) ; }