Make strlen and substr more readable