vibe.d beta banner
get vibe.d

Asynchronous I/O that doesn’t get in your way, written in D

Function URL.normalize

Normalize the content of this URL in place

void normalize (
  bool isDirectory = false
) @safe;

Normalization can be used to create a more consistent and human-friendly string representation of the URL. The list of transformations applied in the process of normalization is as follows: - Converting schema and host to lowercase - Removing port if it is the default port for schema - Removing dot segments in path - Converting percent-encoded triplets to uppercase - Adding slash when path is empty - Adding slash to path when path represents a directory - Decoding percent encoded triplets for unreserved characters A-Z a-z 0-9 - . _ ~


isDirectory Path of the URL represents a directory, if one is not already present, a trailing slash will be appended when true

Sönke Ludwig


© 2012-2017 Sönke Ludwig


Subject to the terms of the MIT license, as written in the included LICENSE.txt file.