#### Returning a default value if the segment doesn't exist:
echo URI::segment(10, 'Foo');
#### Getting the full request URI, including query string:
echo URI::full();
Sometimes you may need to determine if the current URI is a given string, or begins with a given string. Here's an example of how you can use the is() method to accomplish this:
#### Determine if the URI is "home":
if (URI::is('home'))
{
// The current URI is "home"!
}
#### Determine if the current URI begins with "docs/":