Re: [Vala] string <-> bytes conversion in Vala

On 12/23/2010 09:37 AM, Anatol Pomozov wrote:

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 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

Best regards,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]