def _StripLeadingOrTrailingDoubleColons(addr_string):

  if addr_string.startswith("::"):
    return addr_string[1:]
  if addr_string.endswith("::"):
    return addr_string[:-1]
  return addr_string
Strip leading or trailing double colon.
dataset/ETHPy150Open google/grr/grr/lib/ipv6_utils.py/_StripLeadingOrTrailingDoubleColons