$shufftok

By Arigateaux on Feb 27, 2014

Added $shufftok() for use with other token identifiers. It allows you to basically shuffle your tokens around with the character delimiter you choose.

;// $shufftok(text, C)
alias shufftok {
  var %a = $1
  var %c = $iif($2 != 32, $2, 32)
  tokenize %c %a
  var %i = $0
  while (%i) {
    var %r = $r(1, %i)
    var %t = $instok(%t, $gettok(%a, %r, %c), %i, %c)
    %a = $deltok(%a, %r, %c)
    dec %i
  }
  return %t
}

Comments

Sign in to comment.
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.