[Date Prev][Date Next][Subject Prev][Subject Next][Date Index][Subject Index]

Re: XyScript v0.1.1



Reply to note from harrybinswanger <dmarc-noreply@xxxxxxxxxxxxx> Mon, 27 Jul 2026 12:08:01
-0400

Harry,

> One thing I don't understand: "and negative n causes the replacements 
> start from the end of string"
> 
> Example? 

```
set colors = "red red red red"

set newcolors = replace($colors, "red", "green", 1) # positive 1
# newcolors ==> "green red red red"

set newcolors = replace($colors, "red", "green", -1) # negative 1
# newcolors ==> "red red red green"
```

-- 
Carl Distefano
cld@xxxxxxxxxx