public static function EasyRdf_Utils::removeFragmentFromUri

Remove the fragment from a URI (if it has one)

Parameters

mixed $uri A URI:

Return value

string The same URI with the fragment removed

1 call to EasyRdf_Utils::removeFragmentFromUri()

File

drupal/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Utils.php, line 99

Class

EasyRdf_Utils
Class containing static utility functions

Code

public static function removeFragmentFromUri($uri) {
  $pos = strpos($uri, '#');
  if ($pos === false) {
    return $uri;
  }
  else {
    return substr($uri, 0, $pos);
  }
}