On Friday, 13 April 2018 at 17:38:39 UTC, Dr.No wrote:
string s = null;
if(s !is null && s[0] == '/')


is this correct?

No, that doesn't work if the string = "a"[$..$] for example

Just use

if(s.length && s[0])

instead

Reply via email to