String Utility Functions : g_strsplit ()


String Utility Functions: "g_strsplit ()

gchar** g_strsplit (const gchar *string, const gchar *delimiter, gint max_tokens);

Splits a string into a maximum of max_tokens pieces, using the given delimiter. If max_tokens is reached, the remainder of string is appended to the last token.

As a special case, the result of splitting the empty string '' is an empty vector, not a vector containing a single string. The reason for this special case is that being able to represent a empty vector is typically more useful than consistent handling of empty elements. If you do need to represent empty elements, you'll need to check for the empty string before calling g_strsplit().

string : a string to split.
delimiter : a string which specifies the places at which to split the string. The delimiter is not included in any of the resulting strings, unless max_tokens is reached.
max_tokens : the maximum number of pieces to split string into. If this is less than 1, the string is split completely.

Returns : a newly-allocated NULL-ter"

留言

Google

本月熱門文章

台版N號房 台中地檢署調查創意私房偷拍平台 引發連環命案與社會質疑

[黑金] 台南88槍擊案主犯國民黨學甲區黨部主委王文宗 也擔任統促黨幹部

香港朋友看服貿 - 嗨,我是香港人,一個CEPA的受害者。

熱門文章

企鵝妹/柳允進 史上最暈的TT三分鐘完整版一次看個夠

香港朋友,真的對唔住,台灣出了這種中共的幫兇!

陳昇 Bobby Chen【把悲傷留給自己 I left sadness to myself】Official Music Video

裝潢師傅貼圖來了唷

[黑金] 台南88槍擊案主犯國民黨學甲區黨部主委王文宗 也擔任統促黨幹部

新手自建監控雲最快的方式:推薦QNAP NAS 搭配QVR Pro

堅持5個月!反送中示威者六大特色 6 features of Hong Kong Anti-ELAB Protesters│老外看香港│郝毅博 Ben Hedges│新唐人電視台

香港朋友看服貿 - 嗨,我是香港人,一個CEPA的受害者。