Restez organisé à l'aide des collections
Enregistrez et classez les contenus selon vos préférences.
arrays.concat
arrays.concat(string_array, string_array)
Description
Renvoie un tableau de chaînes en copiant les éléments des tableaux de chaînes d'origine.
Types de données des paramètres
ARRAY_STRINGS
– ARRAY_STRINGS
Type renvoyé
ARRAY_STRINGS
Exemples de code
Exemple 1
L'exemple suivant concatène deux tableaux de chaînes différents.
arrays.concat(["test1", "test2"], ["test3"]) = ["test1", "test2", "test3"]
Exemple 2
L'exemple suivant concatène des tableaux avec une chaîne vide.
arrays.concat([""], [""]) = ["", ""]
Exemple 3
L'exemple suivant concatène des tableaux vides.
arrays.concat([], []) = []
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\u003e\u003ccode\u003earrays.concat\u003c/code\u003e is a function that returns a new string array by combining elements from two input string arrays.\u003c/p\u003e\n"],["\u003cp\u003eThis function is supported in Rules and Search contexts within the specified platform.\u003c/p\u003e\n"],["\u003cp\u003eIt accepts two \u003ccode\u003eARRAY_STRINGS\u003c/code\u003e as parameters and returns an \u003ccode\u003eARRAY_STRINGS\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eEmpty string arrays can be passed as parameters, resulting in an empty or combined array as per the operation.\u003c/p\u003e\n"],["\u003cp\u003eThe elements passed as parameters to this method are copied to a new array.\u003c/p\u003e\n"]]],[],null,["### arrays.concat\n\nSupported in: \n[Rules](/chronicle/docs/detection/default-rules) [Search](/chronicle/docs/investigation/udm-search) \n\n arrays.concat(string_array, string_array)\n\n#### Description\n\nReturns a new string array by copying elements from original string arrays.\n\n#### Param data types\n\n`ARRAY_STRINGS`, `ARRAY_STRINGS`\n\n#### Return type\n\n`ARRAY_STRINGS`\n\n#### Code samples\n\n##### Example 1\n\nThe following example concatenates two different string arrays. \n\n arrays.concat([\"test1\", \"test2\"], [\"test3\"]) = [\"test1\", \"test2\", \"test3\"]\n\n##### Example 2\n\nThe following example concatenates arrays with empty string. \n\n arrays.concat([\"\"], [\"\"]) = [\"\", \"\"]\n\n##### Example 3\n\nThe following example concatenates empty arrays. \n\n arrays.concat([], []) = []"]]