Re: [Vala] string <-> bytes conversion in Vala
- From: Frederik <scumm_fredo gmx net>
- To: vala-list <vala-list gnome org>
- Subject: Re: [Vala] string <-> bytes conversion in Vala
- Date: Tue, 04 Jan 2011 22:38:28 +0100
On 12/23/2010 09:37 AM, Anatol Pomozov wrote:
Hi,
I manipulate with strings in my application such as storing/reading
to/from binary files. And I need to convert a string to/from array of
bytes. What is the best way of doing it in Vala?
Looking into string class http://valadoc.org/glib-2.0/string.html I
see a method called string#to_utf8() that converts string to array of
chars. But I cannot find any other methods.
The '.data' property of a string gives you the string as byte array
(uint8[]).
Best regards,
Frederik
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]