Site Tools


shiftbrace

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

shiftbrace [2008/11/30 19:14] (current)
Line 1: Line 1:
 +# $EPIC: shiftbrace.txt,​v 1.3 2008/11/30 19:14:38 jnelson Exp $
 +======Synopsis======
 +$__shiftbrace__(<​lval>​)
 +
 +======Returns:​======
 +If the value of the named variable begins with a braced expression ​
 +(surrounded by curly braces), the expression will be removed from that 
 +variable and the inside of the expression will be returned.
 +
 +If the value of the named variable does not begin with a braced expression,
 +then the variable is not changed and the empty value is returned.
 +
 +Extra spaces may be important! ​ This may change in the future.
 +
 +======Examples:​======
 +<​file>​
 +/assign qwer {asdf zxcv} {zxcv asdf qwer} one two
 +/eval echo $shiftbrace(qwer) ​ =>  asdf zxcv
 +/eval echo $shiftbrace(qwer) ​ =>  zxcv asdf qwer
 +/eval echo $shiftbrace(qwer) ​ =>  (the empty string)
 +</​file>​
  
shiftbrace.txt ยท Last modified: 2008/11/30 19:14 (external edit)