Uri removeFragment()

Returns a Uri that differs from this only in not having a fragment.

If this Uri does not have a fragment, it is itself returned.

Source

Uri removeFragment();