[Vala] Problem with strings



Hello,

I'm trying to code with Vala. In fact to rewrite a C piece of code.

But this piece uses pointer arithmetic inside strings. Are Vala-strings unmutable ?

if I write this, I get an error:

string a = "baer";

a[1] = 'e';

stdout.println("%s\n", a);

but a vala string is a char* if I look at the C version ... so why isn't it allowed ? and, what is the solution ?

thank you
Oliver



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