Mix text identifier(s).

By L4roXyL on Sep 14, 2009

A few simple text codes.(add to aliases)

-

1- $_text(text)
Use: $_text(text)
Example: $_text(This is a test.) - result: ($1)This ($2)is ($3)a ($4)test.
Example 2: raw ::echo -: $_text($1-)

-

2- $ascii(text).ascii / $ascii(ascivalue ascivalue [.] [..]).value
Use: $ascii(text).ascii /or/ $ascii(ascivalue).value
Example(ascii): $ascii(Example).ascii - result: 69 120 97 109 112 108 101
Example(value): $ascii(69 120 97 109 112 108 101).value - result: Example

-

3- $_trans([a-z]|[1-26])
Use: $_trans([a-z]) /or/ $_trans([1-26])
Example([a-z]): $_trans(c) - result: 3
Example([1-26]): $_trans(11) - result: K

;all code by l4roxyl
;-------------------
;Snippet: $_text(text)
_text if ($isid) return $regsubex($$1-,/(?<=^|\s)(.)/g,$+($chr(40),$,\n,$chr(41))\t) 
;-------------------
;Snippet: $ascii(text).ascii / $ascii(ascivalue ascivalue [.] [..]).value
ascii {
  if ($show && !$prop && !$isid) { echo -eca info * error: $!ascii(text).ascii /or/ $!ascii(ascivalue ascivalue [.] [..]).value | return } 
  if ($prop = ascii) return $regsubex($1-,/(.)/g,$chr(32) $asc(\1))
  if ($prop = value) return $regsubex($regsubex($regsubex($regsubex($1-,/(32|160)/g,-),/(\d{1,3})/g,$chr(\1)),/\s/g,),/(-)/g,$chr(32))
}
;-------------------
;Snippet: $_trans([a-z]|[1-26])
_trans {
  if ($isid) {
    var %q = echo $color(info text) * $!trans Error! | if (!$1) { %q | return }
    var %alpha = $regsubex($str(-,26),/-/g,$chr($calc(64+ \n)) $+ \),%num = $regsubex($str(-,26),/-/g,\n $+ \)
    if ($regex($1,/^([a-z]{1})$/i)) return Trans: $1 - $token(%num,$findtok(%alpha,$1,1,92),92) 
    if ($regex($1,^(\d{1,2})$)) return Trans: $1 - $token(%alpha,$findtok(%num,$1,1,92),92) 
    return No trans: $1
  }
}

Comments

Sign in to comment.
^Neptune   -  Sep 16, 2009

I think you should explain what each are - I have no idea what $_text and $trans are.

 Respond  
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.