Jump to content

Substring/Top and tail: Difference between revisions

Line 819:
"123456789"
(s _di -1+#s) _di 0 /String with both 1st and last character removed
"23456789"
</lang>
Another way to implement without using the above system function:
<lang K>
s: "1234567890"
"1234567890"
1 _ s /Delete 1st character
"234567890"
-1 _ s /Delete last character
"123456789"
1 - -1 _ s /Delete 1st and last character
"23456789"
</lang>
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.