encode

fnstring encode(Char)(scope const(Char)[] uri) if (isSomeChar!Char)

Encodes the UTF-8 string uri into a URI and returns that URI. Any character not a valid URI character is escaped. The '#' character is not escaped.