Project

General

Profile

Breplace » History » Version 3

Per Amundsen, 02/08/2014 11:55 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 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
<oldvalue> - Ascii value to replace.
13
<newvalue> - Ascii value to insert.
14
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>