Only trim leading characters not matching spec for first character

Change to use `trimLeadingFrom` to keep allowed characters in the rest of the hostname.