[Vala] [Soup] How to convert uint8[] to string?
- From: Бака Гайдзин <troorl gmail com>
- To: vala-list gnome org
- Subject: [Vala] [Soup] How to convert uint8[] to string?
- Date: Wed, 10 Feb 2010 18:03:15 +0200
Hi!
In the new version of Vala (0.7.10) Soup.Message.response_body.data
returns uint8[] instead string, like in older versions. Is there any
standart way to convert this value to string?
I wrote this piece of code, but it is very ugly and slow, I think:
var session = new SessionAsync();
var message = new Message("GET", "http://meta.ua");
session.send_message(message);
string result = "";
for(int i = 0; i < message.response_body.length; i++) {
result += ((char)message.response_body.data[i]).to_string();
}
Hope for your suggestion.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]