Even then, I don't see why we'd check for that. IF startIdx is smaller than s.length, then it's an error.