Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
12
Task/Substring-Top-and-tail/D/substring-top-and-tail.d
Normal file
12
Task/Substring-Top-and-tail/D/substring-top-and-tail.d
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
import std.stdio;
|
||||
|
||||
void main() {
|
||||
// strip first character
|
||||
writeln("knight"[1 .. $]);
|
||||
|
||||
// strip last character
|
||||
writeln("socks"[0 .. $ - 1]);
|
||||
|
||||
// strip both first and last characters
|
||||
writeln("brooms"[1 .. $ - 1]);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue