Search code examples
valagio

How to create InputStream from string in Vala


Given a string named command, I need to create GLib InputStream object How? Thanks


Solution

  • string command = "foobar";
    GLib.InputStream input_stream = new GLib.MemoryInputStream.from_data (command.data, GLib.g_free);