On Wed, 2009-09-02 at 23:33 +0200, Nicolas wrote:
> Hi Matías,
>
> Thanks for your response, i will try tomorrow.
> But my file is not like this :
>
> [INFO]
> test=yes
> test=no
>
> but like this :
>
> [INFO]
> blah bla here
>blah blah there
> blah blah again
This kind of file turn
Hi Abderrahim,
I use this:
using GLib;
public static void main(string[] args)
{
string contents;
try {
FileUtils.get_contents("test.txt", out contents);
} catch (FileError err) {
stdout.printf("error");
}
var info = contents.str("[INFO]");
if (info != null) {
var needed_text = info.substrin
Hi,
2009/9/3 Nicolas :
> That's the problem, I have a text file, but at a certain place there is, for
> example, the code [INFO] and I need to read everything that comes after this
> code, which in fact is just text !
Maybe you just want FileUtils.get_contents [1], it will return a
string that yo
Hi and thanks for your response.
This function does not work for what I do.
In fact I think I express myself badly, my English is not very good.
That's the problem, I have a text file, but at a certain place there is,
for example, the code [INFO] and I need to read everything that comes
after
Hi Matías,
Thanks for your response, i will try tomorrow.
But my file is not like this :
[INFO]
test=yes
test=no
but like this :
[INFO]
blah bla here
blah blah there
blah blah again
Do you think it can be work with GLib.KeyFile ?
Nicolas.
2009/9/2 Nicolas mailto:c.r@wanadoo.fr>
using GLib;
public static void main(string[] args)
{
KeyFile kf = new KeyFile();
try {
kf.load_from_file("test.ini", KeyFileFlags.NONE);
stdout.printf("==> file0=%s\n",
kf.get_value("LastFiles", "file0"));
} catch (FileErro
2009/9/2 Nicolas
> Hi,
>
> I try to make a little program who read in a file and take only some
> informations (like an .ini file).
> My text file is like this:
>
> [INFO]
> blah
> blah blah
> blah blah blah
>
> Could someone tell me how to create this kind of function ?
>
>
You should use KeyFil
Hi,
I try to make a little program who read in a file and take only some
informations (like an .ini file).
My text file is like this:
[INFO]
blah
blah blah
blah blah blah
Could someone tell me how to create this kind of function ?
Thank you so much in advance,
Nicolas.