class Addressable::URI

def normalized_scheme

Returns:
  • (String) - The scheme component, normalized.
def normalized_scheme
  return nil unless self.scheme
  if @normalized_scheme == NONE
    @normalized_scheme = if self.scheme =~ /^\s*ssh\+svn\s*$/i
      "svn+ssh".dup
    else
      Addressable::URI.normalize_component(
        self.scheme.strip.downcase,
        Addressable::URI::NormalizeCharacterClasses::SCHEME
      )
    end
  end
  # All normalized values should be UTF-8
  force_utf8_encoding_if_needed(@normalized_scheme)
  @normalized_scheme
end