       ^(?:(?&pchar)|[\/?])*$
     /x
 
-    Regex.match?(regex, str)
+    Regex.match?(regex, string)
   end
 
   def is_uri_query?(_), do: false
 
   @spec is_uri_fragment?(any) :: boolean
-  def is_uri_fragment?(str) when is_binary(str), do: is_uri_query?(str)
+  def is_uri_fragment?(string) when is_binary(string), do: is_uri_query?(string)
 
   def is_uri_fragment?(_), do: false
 end

      ^(?&ipv4)$
    /x

    Regex.match?(regex, str)
  end

  def is_ipv4?(_), do: true

  @spec is_ipv6?(any) :: boolean
  def is_ipv6?(str) when is_binary(str) do
    regex = ~r/
      (?(DEFINE)
        (?<h16>(?:[[:xdigit:]]{1,4}) )

      ^(?:(?&rootless)|(?&noscheme)|(?&absolute)|(?&abempty))$
    /x

    Regex.match?(regex, string)
  end

  def is_uri_path?(_), do: false

  @spec is_uri_query?(any) :: boolean
  def is_uri_query?(string) when is_binary(string) do
    regex = ~r/
      (?(DEFINE)
        (?<pct_encoded> %[[:xdigit:]][[:xdigit:]] )
