from: #909
Issue 2: dnsutil.Trim() returns "" when z is longer than s
I was surprised to find that dnsutil.Trim() returns "" when z is longer than s.
strings.TrimPrefix() returns the original string in that situation and I expected it to be similar.
The "" result is ambiguous because it can also mean "s == z". Therefore instead of checking the result for "", I have to check > the inputs to make sure len(z) < len(s).
from: #909
> Issue 2: dnsutil.Trim() returns "" when z is longer than s
>
> I was surprised to find that dnsutil.Trim() returns "" when z is longer than s.
>
> strings.TrimPrefix() returns the original string in that situation and I expected it to be similar.
>
> The "" result is ambiguous because it can also mean "s == z". Therefore instead of checking the result for "", I have to check > the inputs to make sure len(z) < len(s).