Is there any function to get a substring in GLib?
Something like
gchar *getSlice(const gchar *text, gint startIndex);
You can just do:
gchar *s = &text[start_index];
If you want a copy of the substring, do
gchar *s = g_strdup(&text[start_index]);
Remember to free the string when you're done with it in the latter case.