Re: [Phix Tutorial] Basic Sequence Actions
- Posted by _tom
(admin)
Jan 26, 2019
Concatenation
|
Concatenate |
? |
x = '○' |
x = '◍' & x & '●' |
"◍○●" |
s = "○○○" |
s = '◍' & s & '●' |
"◍○○○●" |
s = "○○○" |
s = "◍" & s &"●" |
"◍○○○●" |
s = "○○○" |
s = "◍◍◍" & s & "●●●" |
"◍◍◍○○○●●●" |
Remove
Get rid of an item or slice.
|
Remove |
? |
s = "○◍○○" |
s[2..2] = {} |
"○○○" |
s = "○◍◍◍" |
s[2..$] = {} |
"○" |
Replace
Replace a slice with something completely new.
|
Replace a slice |
? |
s = "○◍○○" |
s[2..2] = '●' |
"○●○○" |
s = "○◍○○" |
s[2..2] = "●" |
"○●○○" |
s = "○◍○○" |
s[2..2] = "●●●●●" |
"○●●●●●○○" |
s = "○◍◍○" |
s[2..3] = "●●" |
"○●●○" |
s = "○◍◍◍" |
s[2..$] = "●●●●●" |
"○●●●●●" |
Not Categorized, Please Help
|
|