Re: [Vala] [Soup] How to convert uint8[] to string?
- From: Frederik <scumm_fredo gmx net>
- To: vala-list <vala-list gnome org>
- Subject: Re: [Vala] [Soup] How to convert uint8[] to string?
- Date: Wed, 10 Feb 2010 19:03:27 +0100
Бака Гайдзин wrote:
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?
In this specific case you should call the flatten() method of
Soup.MessageBody, because the data might not end with '\0':
http://library.gnome.org/devel/libsoup/stable/libsoup-24-SoupMessageBody.html#soup-message-body-flatten
string s = message.response_body.flatten().data
Best regards,
Frederik
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]