Restez organisé à l'aide des collections
Enregistrez et classez les contenus selon vos préférences.
arrays.join_string
arrays.join_string(array_of_strings, optional_delimiter)
Description
Convertit un tableau de chaînes en une seule chaîne séparée par le paramètre facultatif. Si aucun délimiteur n'est fourni, la chaîne vide est utilisée.
Types de données des paramètres
ARRAY_STRINGS
, STRING
Type renvoyé
STRING
Exemples de code
Voici quelques exemples d'utilisation de la fonction :
Exemple 1
Cet exemple joint un tableau avec des éléments non nuls et un délimiteur.
arrays.join_string(["foo", "bar"], ",") = "foo,bar"
Exemple 2
Cet exemple joint un tableau avec un élément nul et un délimiteur.
arrays.join_string(["foo", NULL, "bar"], ",") = "foo,bar"
Exemple 3
Cet exemple joint un tableau avec des éléments non nuls et sans délimiteur.
arrays.join_string(["foo", "bar"]) = "foobar"
Sauf indication contraire, le contenu de cette page est régi par une licence Creative Commons Attribution 4.0, et les échantillons de code sont régis par une licence Apache 2.0. Pour en savoir plus, consultez les Règles du site Google Developers. Java est une marque déposée d'Oracle et/ou de ses sociétés affiliées.
Dernière mise à jour le 2025/07/29 (UTC).
[[["Facile à comprendre","easyToUnderstand","thumb-up"],["J'ai pu résoudre mon problème","solvedMyProblem","thumb-up"],["Autre","otherUp","thumb-up"]],[["Difficile à comprendre","hardToUnderstand","thumb-down"],["Informations ou exemple de code incorrects","incorrectInformationOrSampleCode","thumb-down"],["Il n'y a pas l'information/les exemples dont j'ai besoin","missingTheInformationSamplesINeed","thumb-down"],["Problème de traduction","translationIssue","thumb-down"],["Autre","otherDown","thumb-down"]],["Dernière mise à jour le 2025/07/29 (UTC)."],[[["\u003cp\u003eThe \u003ccode\u003earrays.join_string\u003c/code\u003e function merges an array of strings into a single string.\u003c/p\u003e\n"],["\u003cp\u003eAn optional delimiter can be used to separate the string elements; otherwise, strings will be concatenated without a separator.\u003c/p\u003e\n"],["\u003cp\u003eNull elements within the array are ignored during the string concatenation process.\u003c/p\u003e\n"],["\u003cp\u003eThis function is compatible with Chronicle's default rules and search functionalities.\u003c/p\u003e\n"]]],[],null,["### arrays.join_string\n\nSupported in: \n[Rules](/chronicle/docs/detection/default-rules) [Search](/chronicle/docs/investigation/udm-search) \n\n arrays.join_string(array_of_strings, optional_delimiter)\n\n#### Description\n\nConverts an array of strings into a single string separated by the optional parameter. If no delimiter is provided, the empty string is used.\n\n#### Param data types\n\n`ARRAY_STRINGS`, `STRING`\n\n#### Return type\n\n`STRING`\n\n#### Code samples\n\nHere are some examples of how to use the function:\n\n##### Example 1\n\nThis example joins an array with non-null elements and a delimiter. \n\n arrays.join_string([\"foo\", \"bar\"], \",\") = \"foo,bar\"\n\n##### Example 2\n\nThis example joins an array with a null element and a delimiter. \n\n arrays.join_string([\"foo\", NULL, \"bar\"], \",\") = \"foo,bar\"\n\n##### Example 3\n\nThis example joins an array with non-null elements and no delimiter. \n\n arrays.join_string([\"foo\", \"bar\"]) = \"foobar\""]]