[GLib] How to get substrings?
- From: Daniel Miralles García <namarie oasi upc es>
- To: gtk-app-devel-list gnome org
- Subject: [GLib] How to get substrings?
- Date: Mon, 8 Nov 2004 12:31:43 +0100 (CET)
Hi, dudes!
I'm porting my old-style char* to gchar* (due to some SF's that appear
when I dont't printf("")).
I've been looking a few here and there, but found no function to get a
substring (I mean, from a string, get a substring between two characters
or even two positions). For instance:
Origin = "ABCDEFGH"
my_str = g_get_substring_beteen (origin, "D", "G");
and then my_str=="EF"
I though making it, but I need some "look a character" function:
char mychar = g_get_char (origin, position);
or something like this...
...and then maybe appending a character to a string?
origin = g_strdup("hell");
g_string_append_char (origin, "o");
just to have origin -> "hello"...
Any function in GLIB to do that?
Thanx a lot...
.-:Namarie:-.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]