Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
8
Task/Substring-Top-and-tail/K/substring-top-and-tail-1.k
Normal file
8
Task/Substring-Top-and-tail/K/substring-top-and-tail-1.k
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
s: "1234567890"
|
||||
"1234567890"
|
||||
s _di 0 /Delete 1st character
|
||||
"234567890"
|
||||
s _di -1+#s /Delete last character
|
||||
"123456789"
|
||||
(s _di -1+#s) _di 0 /String with both 1st and last character removed
|
||||
"23456789"
|
||||
8
Task/Substring-Top-and-tail/K/substring-top-and-tail-2.k
Normal file
8
Task/Substring-Top-and-tail/K/substring-top-and-tail-2.k
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
s: "1234567890"
|
||||
"1234567890"
|
||||
1 _ s /Delete 1st character
|
||||
"234567890"
|
||||
-1 _ s /Delete last character
|
||||
"123456789"
|
||||
1 - -1 _ s /Delete 1st and last character
|
||||
"23456789"
|
||||
Loading…
Add table
Add a link
Reference in a new issue