drupal_substr() is no more.
url() is no more. Handle new non-url() behavior. Also, "dirty" URLs are entirely gone somehow.
Issue #2363049 by Berdir: Fixed language_url_split_prefix() was removed.