Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
18
Task/Substring/D/substring.d
Normal file
18
Task/Substring/D/substring.d
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
import std.stdio, std.string;
|
||||
|
||||
void main() {
|
||||
const s = "the quick brown fox jumps over the lazy dog";
|
||||
enum n = 5, m = 3;
|
||||
|
||||
writeln(s[n .. n + m]);
|
||||
|
||||
writeln(s[n .. $]);
|
||||
|
||||
writeln(s[0 .. $ - 1]);
|
||||
|
||||
const i = s.indexOf("q");
|
||||
writeln(s[i .. i + m]);
|
||||
|
||||
const j = s.indexOf("qu");
|
||||
writeln(s[j .. j + m]);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue