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 Search

推薦內容橫式

本月熱門文章

鋼鐵韓粉站出來 讓韓國瑜每天唱歌喝酒好不好

黑金? 不得不提前總統馬英九大姊馬以南 吳敦義 林益世

捐款支持義大利靈醫會 一起來幫助他們 就像當初教士來台灣協助我們一樣 !!

「港版國安法」,法律將會放在《基本法》附件三在港實施,而非就《基本法》23條立法

從台灣省長宋楚瑜到台北市長柯文哲,可以說 宋楚瑜 2.0 就是柯文哲

香港事件回顧 2020/08/10 前眾志成員周庭及壹傳媒創辦人黎智英被捕 今日累計10人被捕

北京故宮首訪,一窺清宮秘史 大玉兒 & 甄嬛

除了兒福聯盟 還有其他團體是努力守護孩子們 芥菜種會愛心育幼院 及忠義育幼院 都需要大家幫忙

兒福聯盟到底多有錢?收捐款為什麼不做事情而是定存?王育敏不解釋嗎?

這個網誌中的熱門文章

Android應用開發豆知識:利用 adb 安裝 apk 到裝置上

Android 中文輸入法 官方版 ! Gboard - Google 鍵盤 開始支援注音輸入啦

Google Play 推薦Android app 誠徵App排行榜

北京故宮首訪,一窺清宮秘史 大玉兒 & 甄嬛

[家教][社會觀察] 建中教我的事 沒上建中被父母親折磨? 在建中到底是如何 ...

[FAANG面試] Amazon/AWS 領導力準則 14 Amazon Leadership Principles

Acer ICONIA Smart S300 更新後越來越好 Acer也有出手機?!

[品質控制] 什麼是Sanity test ? 軟體測試常見名詞整理 包含不同部門的測試人員負責範圍

新鮮人找工作:職場名詞解釋 AE FAE Pre-sales Post-sales