$unstrip

By Scakk on Aug 26, 2008

This is a reverse version of $strip ( minus the color part )

Usage:
-- $unstrip(TEXT) = Text in default status.
-- $unstrip(TEXT).b -- Bold
-- $unstrip(TEXT).u -- Underline
-- $unstrip(TEXT).r -- Reverse
-- $unstrip(TEXT).br -- Bold & Reverse ( also .rb )
-- $unstrip(TEXT).bu -- Bold & Underline ( also .ub )
-- $unstrip(TEXT).ru -- Reverse & Underline ( also .ur )
-- $unstrip(TEXT).bru -- ( Does bold , reverse and underline ) ( also .bur .rub .rbu .ubr .urb )

http://www.hawkee.com/snippet/5010/ <-- $coloring alias

/*
Usage:
-- $unstrip(TEXT) = Text in default status.
-- $unstrip(TEXT).b -- Bold
-- $unstrip(TEXT).u -- Underline 
-- $unstrip(TEXT).r -- Reverse 
-- $unstrip(TEXT).br -- Bold & Reverse ( also .rb )
-- $unstrip(TEXT).bu -- Bold & Underline ( also .ub )
-- $unstrip(TEXT).ru -- Reverse & Underline ( also .ur )
-- $unstrip(TEXT).bru -- ( Does bold , reverse and underline ) ( also .bur .rub .rbu .ubr .urb )
*/

alias unstrip { 
  if ($isid) { return $+($iif(b isin $prop,$chr(2)),$iif(r isin $prop,$chr(22)),$iif(u isin $prop,$chr(31)),$1,$chr(15)) }
}

Comments

Sign in to comment.
vaseline28   -  Aug 27, 2008

Just a BIT!. Nice now really short!
I agree here with Scakk, it's a useful tool, particularly for people unfamiliar with Ctrl + U or B etc.

 Respond  
Scakk   -  Aug 27, 2008

Shortened this one down a bit.

 Respond  
Scakk   -  Aug 26, 2008

I mainly did this one and the $coloring one as some asked if there was an identifer for adding in underline without using CTRL + U before and after something. I just went ahead and wrote one for it as you see now.

 Respond  
BlueThen   -  Aug 26, 2008

This seems unnecessary, seeing as how it can be done a lot easier by putting the control codes back in.

 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.