mlquote

Lib.mlquote : string -> string

Put quotation marks around a string.

Like quote, mlquote s puts quotation marks around a string. However, it also transforms the characters in a string so that, when printed, it would be a valid ML lexeme.

Failure

Never fails

Example

> quote "foo\nbar";
val it = "val it = foo \nbar ; \n": string

> mlquote "foo\nbar";
val it = "\"foo\\nbar\"": string

See also

Lib.quote