Use of -1 as length argument to no substr-ing