Substring/Top and tail: Difference between revisions

(added js, php, python, ruby)
Line 6:
* String with both the first and last characters removed
 
=={{header|J}}==
The monadic primitives <code>}.</code> (Behead) and <code>}:</code> (Curtail).
 
'''Example use:'''<br>
<lang j> }. 'knight' NB. drop first item
night
}: 'socks' NB. drop last item
sock
}:@}. 'brooms' NB. drop first and last items
room</lang>
=={{header|JavaScript}}==
 
892

edits