Substring/Top and tail: Difference between revisions

Content added Content deleted
No edit summary
Line 448: Line 448:
30 PRINT LEFT$(b$,LEN(b$)-1)
30 PRINT LEFT$(b$,LEN(b$)-1)
40 PRINT MID$(c$,2,LEN(c$)-2)</lang>
40 PRINT MID$(c$,2,LEN(c$)-2)</lang>

=={{header|Julia}}==
<lang julia>julia> "My String"[2:end] #without first character
"y String"

julia> "My String"[1:end-1] #without last character
"My Strin"

julia> chop("My String") #alternate remove last character
"My Strin"</lang>


=={{header|Lua}}==
=={{header|Lua}}==