As `substr` is “non-standard” I prefer to use `slice`. Mind changing this? 

Also, `==` instead of `===` please.