Substring/Top and tail: Difference between revisions

(add scala)
Line 345:
println("socks" dropRight 1) // strip last character
println("brooms".tail dropRight 1) // strip both first and last characters</lang>
 
 
=={{header|SNOBOL4}}==
<lang snobol4> "knight" len(1) rem . output ;* strip first character
"socks" rtab(1) . output ;* strip last character
"brooms" len(1) rtab(1) . output ;* strip both first and last characters</lang>
 
=={{header|Tcl}}==
Anonymous user