If the string is only say 100k, you're ok using just a string. Define a function with an HREFVAR parameter instead of defining a function which returns a strings. That way, the interpreter does not have to convert the string and push it onto the stack. For really large data, you might want to use an editor buffer since it has no size limit. From Slick-C use _create_temp_view, _open_temp_view, _delete_temp_view. These functions create an editor window (int wid) which you can treat like an object. vsInsertLine(wid,...).
Hope this helps.