Project

General

Profile

Breplace » History » Version 1

Per Amundsen, 02/08/2014 11:53 PM

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