vibe.d beta banner
get vibe.d
0.10.1

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

Function formEncode

Returns the form encoded version of a given string.

T[] formEncode(T) (
  T[] str,
  const(char)[] allowed_chars = null
)
if (is(T[] : const(char)[]));

Form encoding is the same as normal URL encoding, except that spaces are replaced by plus characters.

Note that newlines should always be represented as \r\n sequences according to the HTTP standard.

Authors

Jan Krüger, Sönke Ludwig

Copyright

© 2012-2015 Sönke Ludwig

License

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