RosettaCodeData/Task/Substring-Top-and-tail/Julia/substring-top-and-tail.julia

9 lines
203 B
Text
Raw Permalink Normal View History

2014-01-17 05:32:22 +00:00
julia> "My String"[2:end] # without first character
2013-04-11 01:07:29 -07:00
"y String"
2014-01-17 05:32:22 +00:00
julia> "My String"[1:end-1] # without last character
2013-04-11 01:07:29 -07:00
"My Strin"
2014-01-17 05:32:22 +00:00
julia> "My String"[2:end-1] # without first and last characters
"y Strin"