Project

General

Profile

Breplace » History » Version 4

Per Amundsen, 08/09/2015 05:49 AM

1 1 Per Amundsen
_Added in 1.9.0_
2
3
*/breplace <&binvar> <oldvalue> <newvalue> [oldvalue newvalue...]*
4
5 4 Per Amundsen
Replaces all matching "ASCII":http://www.asciitable.com/ values in &binvar with new values.
6 1 Per Amundsen
7 3 Per Amundsen
Multiple values can be replaced by adding more old/new parameters.
8 2 Per Amundsen
9 1 Per Amundsen
*Parameters*
10
11
<&binvar>- The &binvar to modify.
12 4 Per Amundsen
<oldvalue> - "ASCII":http://www.asciitable.com/ value to replace.
13
<newvalue> - "ASCII":http://www.asciitable.com/ value to insert.
14 1 Per Amundsen
15
*Example*
16
17
<pre>
18
alias example {
19
  ;Create a binary variable set it to "Hello World"
20
  bset -t &Example 1 Hello World
21
 
22
  ;Replace e (ASCII value 101) with 3 (ASCII value 51)
23
  breplace &Example 101 51
24
 
25
  ;Echo our new string
26
  echo -a $bvar(&Example,1,$bvar(&Example,0)).text
27
}
28
</pre>