mirror of
https://github.com/sagiegurari/duckscript
synced 2024-09-06 00:34:07 +00:00
20 lines
354 B
Plaintext
20 lines
354 B
Plaintext
|
|
# string is 'Hello World'
|
|
string = substring "Hello World"
|
|
echo ${string}
|
|
|
|
# string is 'll'
|
|
string = substring "Hello World" 2 4
|
|
echo ${string}
|
|
|
|
# string is 'llo World'
|
|
string = substring "Hello World" 2
|
|
echo ${string}
|
|
|
|
# string is 'Hello W'
|
|
string = substring "Hello World" -4
|
|
echo ${string}
|
|
|
|
len = length "Hello World"
|
|
echo The text length is: ${len}
|