diff options
Diffstat (limited to 'doc')
-rw-r--r-- | doc/en/weechat_plugin_api.en.adoc | 16 | ||||
-rw-r--r-- | doc/fr/weechat_plugin_api.fr.adoc | 19 | ||||
-rw-r--r-- | doc/it/weechat_plugin_api.it.adoc | 21 | ||||
-rw-r--r-- | doc/ja/weechat_plugin_api.ja.adoc | 20 | ||||
-rw-r--r-- | doc/sr/weechat_plugin_api.sr.adoc | 20 |
5 files changed, 75 insertions, 21 deletions
diff --git a/doc/en/weechat_plugin_api.en.adoc b/doc/en/weechat_plugin_api.en.adoc index 0434bf54f..8d857272d 100644 --- a/doc/en/weechat_plugin_api.en.adoc +++ b/doc/en/weechat_plugin_api.en.adoc @@ -1790,20 +1790,28 @@ This function is not available in scripting API. ==== string_rebuild_split_string -Rebuild a string with a split string. +_Updated in 3.7._ + +Rebuild a string with a split string, using optional separator and index of +first/last string to use. Prototype: [source,c] ---- char *weechat_string_rebuild_split_string (char **split_string, - const char *separator); + const char *separator, + int index_start, int index_end); ---- Arguments: * _split_string_: string split by function <<_string_split,string_split>> -* _separator_: string used to separate strings +* _separator_: string used to separate strings (can be NULL or empty string) +* _index_start_: index of first string to use (≥ 0) +* _index_end_: index of last string to use + (must be ≥ _index_start_; special value -1 can be used to use all arguments + until NULL is found) Return value: @@ -1816,7 +1824,7 @@ C example: char **argv; int argc; argv = weechat_string_split ("abc def ghi", " ", 0, 0, &argc); -char *str = weechat_string_rebuild_split_string (argv, ";"); +char *str = weechat_string_rebuild_split_string (argv, ";", 0, -1); /* str == "abc;def;ghi" */ /* ... */ free (str); diff --git a/doc/fr/weechat_plugin_api.fr.adoc b/doc/fr/weechat_plugin_api.fr.adoc index c978d7175..df324b4ad 100644 --- a/doc/fr/weechat_plugin_api.fr.adoc +++ b/doc/fr/weechat_plugin_api.fr.adoc @@ -1822,20 +1822,29 @@ Cette fonction n'est pas disponible dans l'API script. ==== string_rebuild_split_string -Reconstruire une chaîne à partir d'une chaîne découpée. +_Mis à jour dans la 3.7._ + +Reconstruire une chaîne à partir d'une chaîne découpée, d'un séparateur facultatif +et d'un index de première/dernière chaîne à utiliser. Prototype : [source,c] ---- -char *weechat_string_rebuild_split_string (char **split_string - const char *separator); +char *weechat_string_rebuild_split_string (char **split_string, + const char *separator, + int index_start, int index_end); ---- Paramètres : * _split_string_ : chaîne découpée par la fonction <<_string_split,string_split>> -* _separator_ : chaîne utilisée pour séparer les différentes chaînes +* _separator_ : chaîne utilisée pour séparer les différentes chaînes (peut être + NULL ou une chaîne vide) +* _index_start_ : index de la première chaîne à utiliser (≥ 0) +* _index_end_ : index de la dernière chaîne à utiliser (doit être ≥ _index_start_ ; + la valeur spéciale -1 peut être utilisée pour utiliser toutes les chaînes + jusqu'à ce que NULL soit trouvé) Valeur de retour : @@ -1849,7 +1858,7 @@ Exemple en C : char **argv; int argc; argv = weechat_string_split ("abc def ghi", " ", 0, 0, &argc); -char *str = weechat_string_rebuild_split_string (argv, ";"); +char *str = weechat_string_rebuild_split_string (argv, ";", 0, -1); /* str == "abc;def;ghi" */ /* ... */ free (str); diff --git a/doc/it/weechat_plugin_api.it.adoc b/doc/it/weechat_plugin_api.it.adoc index 7b2ae3e40..250289be9 100644 --- a/doc/it/weechat_plugin_api.it.adoc +++ b/doc/it/weechat_plugin_api.it.adoc @@ -1873,20 +1873,33 @@ Questa funzione non è disponibile nelle API per lo scripting. ==== string_rebuild_split_string -Compila una stringa con una stringa divisa. +// TRANSLATION MISSING +_Updated in 3.7._ + +// TRANSLATION MISSING +Rebuild a string with a split string, using optional separator and index of +first/last string to use. Prototipo: [source,c] ---- char *weechat_string_rebuild_split_string (char **split_string, - const char *separator); + const char *separator, + int index_start, int index_end); ---- Argomenti: * _split_string_: stringa divisa dalla funzione <<_string_split,string_split>> -* _separator_: stringa usata per separare le stringhe +// TRANSLATION MISSING +* _separator_: string used to separate strings (can be NULL or empty string) +// TRANSLATION MISSING +* _index_start_: index of first string to use (≥ 0) +// TRANSLATION MISSING +* _index_end_: index of last string to use + (must be ≥ _index_start_; special value -1 can be used to use all arguments + until NULL is found) Valore restituito: @@ -1900,7 +1913,7 @@ Esempio in C: char **argv; int argc; argv = weechat_string_split ("abc def ghi", " ", 0, 0, &argc); -char *str = weechat_string_rebuild_split_string (argv, ";"); +char *str = weechat_string_rebuild_split_string (argv, ";", 0, -1); /* str == "abc;def;ghi" */ /* ... */ free (str); diff --git a/doc/ja/weechat_plugin_api.ja.adoc b/doc/ja/weechat_plugin_api.ja.adoc index 0254abc38..5f72dafcb 100644 --- a/doc/ja/weechat_plugin_api.ja.adoc +++ b/doc/ja/weechat_plugin_api.ja.adoc @@ -1811,21 +1811,33 @@ weechat_string_free_split (argv); ==== string_rebuild_split_string -分割文字列から文字列を作る。 +_WeeChat バージョン 3.7 で更新。_ + +// TRANSLATION MISSING +Rebuild a string with a split string, using optional separator and index of +first/last string to use. プロトタイプ: [source,c] ---- char *weechat_string_rebuild_split_string (char **split_string, - const char *separator); + const char *separator, + int index_start, int index_end); ---- 引数: * _split_string_: 関数 <<_string_split,string_split>> が返した分割文字列の配列 -* _separator_: 文字列を分割する区切り文字 +// TRANSLATION MISSING +* _separator_: string used to separate strings (can be NULL or empty string) +// TRANSLATION MISSING +* _index_start_: index of first string to use (≥ 0) +// TRANSLATION MISSING +* _index_end_: index of last string to use + (must be ≥ _index_start_; special value -1 can be used to use all arguments + until NULL is found) 戻り値: @@ -1838,7 +1850,7 @@ C 言語での使用例: char **argv; int argc; argv = weechat_string_split ("abc def ghi", " ", 0, 0, &argc); -char *str = weechat_string_rebuild_split_string (argv, ";"); +char *str = weechat_string_rebuild_split_string (argv, ";", 0, -1); /* str == "abc;def;ghi" */ /* ... */ free (str); diff --git a/doc/sr/weechat_plugin_api.sr.adoc b/doc/sr/weechat_plugin_api.sr.adoc index c3a8e182b..b3abeb02c 100644 --- a/doc/sr/weechat_plugin_api.sr.adoc +++ b/doc/sr/weechat_plugin_api.sr.adoc @@ -1713,20 +1713,32 @@ weechat_string_free_split (argv); ==== string_rebuild_split_string -Изграђује стринг од подељеног стринга. +_Ажурирано у верзији 3.7._ + +// TRANSLATION MISSING +Rebuild a string with a split string, using optional separator and index of +first/last string to use. Прототип: [source,c] ---- char *weechat_string_rebuild_split_string (char **split_string, - const char *separator); + const char *separator, + int index_start, int index_end); ---- Аргументи: * _split_string_: стринг подељен функцијом <<_string_split,string_split>> -* _separator_: стринг који се користи за раздвајање стрингова +// TRANSLATION MISSING +* _separator_: string used to separate strings (can be NULL or empty string) +// TRANSLATION MISSING +* _index_start_: index of first string to use (≥ 0) +// TRANSLATION MISSING +* _index_end_: index of last string to use + (must be ≥ _index_start_; special value -1 can be used to use all arguments + until NULL is found) Повратна вредност: @@ -1739,7 +1751,7 @@ C пример: char **argv; int argc; argv = weechat_string_split ("abc def ghi", " ", 0, 0, &argc); -char *str = weechat_string_rebuild_split_string (argv, ";"); +char *str = weechat_string_rebuild_split_string (argv, ";", 0, -1); /* str == "abc;def;ghi" */ /* ... */ free (str); |