Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
21
Task/Copy-a-string/REBOL/copy-a-string.rebol
Normal file
21
Task/Copy-a-string/REBOL/copy-a-string.rebol
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
REBOL [
|
||||
Title: "String Copy"
|
||||
URL: http://rosettacode.org/wiki/Copy_a_string
|
||||
]
|
||||
|
||||
x: y: "Testing."
|
||||
y/2: #"X"
|
||||
print ["Both variables reference same string:" mold x "," mold y]
|
||||
|
||||
x: "Slackeriffic!"
|
||||
print ["Now reference different strings:" mold x "," mold y]
|
||||
|
||||
y: copy x ; String copy here!
|
||||
y/3: #"X" ; Modify string.
|
||||
print ["x copied to y, then modified:" mold x "," mold y]
|
||||
|
||||
y: copy/part x 7 ; Copy only the first part of y to x.
|
||||
print ["Partial copy:" mold x "," mold y]
|
||||
|
||||
y: copy/part skip x 2 3
|
||||
print ["Partial copy from offset:" mold x "," mold y]
|
||||
Loading…
Add table
Add a link
Reference in a new issue