handle zero-length strings