I haven't so far found how I can most easily check if a string starts with a certain character in D.
I want something like:
if (my_str.startswith("/")) {
// Do something
}
The closest I found was "chompPrefix" (here), but that is not really what I want.
There's a startsWith in std.algorithm that will work just like that.
import std.algorithm;
import std.stdio;
void main() {
string my_str = "/test";
if(my_str.startsWith("/"))
writeln("cool");
}