Convert char to string in OCaml

char, ocaml, string, type-conversion

Solution

If you use Core, you can write

open Core.Std

let s = Char.to_string 's'

Problem

I want to convert a char to a string but I haven't found a function `string_of_char`. I want to do that using only functions from Pervasives.

Original source