Jump to content

Substring/Top and tail: Difference between revisions

move the julia section so as to restore alphabetic order.
mNo edit summary
(move the julia section so as to restore alphabetic order.)
Line 507:
alert("brooms".slice(1, -1)); // strip both first and last characters</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|Lasso}}==
Line 553 ⟶ 562:
30 PRINT LEFT$(b$,LEN(b$)-1)
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|Lasso}}==
Cookies help us deliver our services. By using our services, you agree to our use of cookies.