Module lousy.uri

lousy.uri library

URI parsing functions

Functions

lousy.uri.is_uri (s)

Guess if a string is an URI.

Parameters

  • s
    Type: string
    The input string.

Return Values

  • boolean
    true if the string could be a URI, false otherwise.

lousy.uri.split (s)

Split a string into URIs or group of words.

Parameters

  • s
    Type: string
    The string to split.

Return Values

  • table
    A table of strings whose member is either a group of words to be searched or a URI

lousy.uri.parse_query (query)

Parse the query component of a URI and return it as a table.

Parameters

  • query
    Type: string
    The query component of a URI.

Return Values

  • table
    The parsed table of query options.

lousy.uri.parse (uri)

Parse a URI string and return a URI table.

Parameters

  • uri
    Type: string
    The URI as a string.

Return Values

  • table
    The URI as a table.

lousy.uri.copy (uri)

Duplicate a URI table.

Parameters

  • uri
    Type: table
    The URI as a table.

Return Values

  • table
    A new copy of the URI table.

lousy.uri.domains_from_uri (uri)

Find the domains that a given URI belongs to.

Parameters

  • uri
    Type: string
    The URI.

Return Values

  • {string}
    An array of domains.

Attribution

Copyright