This can be trivially implemented with the existing functionality, so I
would recommend defining it in your own apps.



*José Valim*
www.plataformatec.com.br
Skype: jv.ptec
Founder and Director of R&D

On Sun, Mar 26, 2017 at 11:39 AM, Dmitry Rubinstein <[email protected]>
wrote:

> Hello!
>
>
> I want to propose some new features in URI module.
>
> First one is naked domain, which works something like this
>
> assert "http://foo.bar.baz.com"; |> URI.parse |> Map.get(:naked_domain) ==
> "baz.com"
> or
> assert "http://foo.bar.baz.com"; |> URI.naked_domain == "baz.com"
>
> And subdomain method:
>
> assert "http://foo.bar.baz.com"; |> URI.subdomain("baz.com") == "foo.bar"
> assert "http://foo.bar.baz.com"; |> URI.subdomain("bar.baz.com") == "foo"
>
> May be it can be relevant.
>
> --
> You received this message because you are subscribed to the Google Groups
> "elixir-lang-core" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/elixir-lang-core/908c9ab7-321f-43c3-9bdc-
> 8f695f7ebd79%40googlegroups.com
> <https://groups.google.com/d/msgid/elixir-lang-core/908c9ab7-321f-43c3-9bdc-8f695f7ebd79%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"elixir-lang-core" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elixir-lang-core/CAGnRm4Jz0LXHT-t%3DKZZTBkn1QXdezWNd5rmQYmUZ1DdaJBCFHw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to