import std.algorithm.searching: startsWith, commonPrefix;
if(s1.startsWith(s2)) {...}
string prefix = commonPrefix(s1,s2);

Reply via email to