RosettaCodeData/Task/Substring/Frink/substring.frink

13 lines
262 B
Text
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
test = "🐱abcdefg😾"
n = 3
m = 2
println[substrLen[test, n, m]]
println[right[test, -m]]
println[left[test, -1]]
pos = indexOf["c"]
if pos != -1
println[substrLen[test, pos, m]]
pos = indexOf[test, "cd"]
if pos != -1
println[substrLen[test, pos, m]]