Project

General

Profile

Actions

Added in 1.9.0

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

Replaces all matching ASCII values in &binvar with new values.

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

Parameters

Parameter Description
<&binvar> The &binvar to modify.
<oldvalue> ASCII value to replace.
<newvalue> ASCII value to insert.

Example

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
}

Updated by Per Amundsen about 1 year ago · 5 revisions

Also available in: PDF HTML TXT