Project

General

Profile

Breplace » History » Revision 4

Revision 3 (Per Amundsen, 02/08/2014 11:55 PM) → Revision 4/5 (Per Amundsen, 08/09/2015 05:49 AM)

_Added in 1.9.0_ 

 */breplace <&binvar> <oldvalue> <newvalue> [oldvalue newvalue...]* 

 Replaces all matching "ASCII":http://www.asciitable.com/ ascii values in &binvar with new values. 

 Multiple values can be replaced by adding more old/new parameters. 

 *Parameters* 

 <&binvar>- The &binvar to modify. 
 <oldvalue> - "ASCII":http://www.asciitable.com/ Ascii value to replace. 
 <newvalue> - "ASCII":http://www.asciitable.com/ Ascii value to insert. 

 *Example* 

 <pre> 
 alias example { 
   ;Create a binary variable set it to "Hello World" 
   bset -t &Example 1 Hello World 
 
   ;Replace e (ASCII value 101) with 3 (ASCII value 51) 
   breplace &Example 101 51 
 
   ;Echo our new string 
   echo -a $bvar(&Example,1,$bvar(&Example,0)).text 
 } 
 </pre>