func: gchar **ep_strsplit(const gchar *string,const gchar *sep,int max_tokens) gchar * splitted ; gchar * s ; guint tokens ; guint sep_len ; guint i ; if ( ! string || ! sep || ! sep [ 0 ] )  s = splitted = ep_strdup ( string ); gchar *ep_strdup(const gchar *src) return emem_strdup ( src , ep_alloc ) ; static gchar *emem_strdup(const gchar *src,void *allocator(size_t )) guint len ; gchar * dst ; if ( ! src )  return "<NULL>" ; len = ( ( guint ) ( strlen ( src ) ) ); dst = ( memcpy ( allocator ( ( len + 1 ) ) , src , ( len + 1 ) ) ); return dst ; sep_len = ( ( guint ) ( strlen ( sep ) ) ); if ( max_tokens < 1 )  max_tokens = 2147483647; tokens = 1; while ( tokens <= ( ( guint ) max_tokens ) && ( s = strstr ( s , sep ) ) )  tokens ++; for (i = 0; i < sep_len; i++) s [ i ] = '\0'; s += sep_len; for (i = 0; i < str_len; i++) switch ( splitted [ i ] )  vec [ curr_tok ] = & splitted [ i ]; curr_tok ++; switch ( splitted [ i ] )  switch ( splitted [ i ] )  vec [ curr_tok ] = & splitted [ i ]; curr_tok ++; vec [ curr_tok ] = ( ( void * ) 0 ); return vec ; 