Quantcast
Channel: User aggsol - Stack Overflow
Viewing all articles
Browse latest Browse all 44

How to create string from uint8[] in Vala?

$
0
0

I am doing async reads from a DataInputStream filling a buffer with bytes.

uint8[] buffer = new uint8[4096];size_t bytes = 0;bool success = false;do{  success = yield process.get_stdout_pipe().read_all_async(    buffer,    GLib.Priority.LOW,     null,     out bytes  );{while(success && bytes > 0);

I want to combine the data into a string. I had a look at StringBuilder but that has no function to append any arrays.

What is the best approach to build a string while async reading?


Viewing all articles
Browse latest Browse all 44

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>