Mit Sammlungen den Überblick behalten
Sie können Inhalte basierend auf Ihren Einstellungen speichern und kategorisieren.
arrays.concat
arrays.concat(string_array, string_array)
Beschreibung
Gibt ein neues String-Array zurück, indem Elemente aus den ursprünglichen String-Arrays kopiert werden.
Parameterdatentypen
ARRAY_STRINGS
, ARRAY_STRINGS
Rückgabetyp
ARRAY_STRINGS
Codebeispiele
Beispiel 1
Im folgenden Beispiel werden zwei verschiedene String-Arrays verkettet.
arrays.concat(["test1", "test2"], ["test3"]) = ["test1", "test2", "test3"]
Beispiel 2
Im folgenden Beispiel werden Arrays mit einem leeren String verkettet.
arrays.concat([""], [""]) = ["", ""]
Beispiel 3
Im folgenden Beispiel werden leere Arrays verkettet.
arrays.concat([], []) = []
Sofern nicht anders angegeben, sind die Inhalte dieser Seite unter der Creative Commons Attribution 4.0 License und Codebeispiele unter der Apache 2.0 License lizenziert. Weitere Informationen finden Sie in den Websiterichtlinien von Google Developers. Java ist eine eingetragene Marke von Oracle und/oder seinen Partnern.
Zuletzt aktualisiert: 2025-07-29 (UTC).
[[["Leicht verständlich","easyToUnderstand","thumb-up"],["Mein Problem wurde gelöst","solvedMyProblem","thumb-up"],["Sonstiges","otherUp","thumb-up"]],[["Schwer verständlich","hardToUnderstand","thumb-down"],["Informationen oder Beispielcode falsch","incorrectInformationOrSampleCode","thumb-down"],["Benötigte Informationen/Beispiele nicht gefunden","missingTheInformationSamplesINeed","thumb-down"],["Problem mit der Übersetzung","translationIssue","thumb-down"],["Sonstiges","otherDown","thumb-down"]],["Zuletzt aktualisiert: 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([], []) = []"]]