コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
arrays.join_string
arrays.join_string(array_of_strings, optional_delimiter)
説明
文字列の配列を、省略可能なパラメータで区切られた単一の文字列に変換します。区切り文字が指定されていない場合は、空の文字列が使用されます。
パラメータのデータ型
ARRAY_STRINGS
、STRING
戻り値の型
STRING
コードサンプル
関数の使用例をいくつかご紹介します。
例 1
この例では、非 null 要素を含む配列と区切り文字を結合します。
arrays.join_string(["foo", "bar"], ",") = "foo,bar"
例 2
この例では、null 要素と区切り文字を含む配列を結合します。
arrays.join_string(["foo", NULL, "bar"], ",") = "foo,bar"
例 3
この例では、非 null 要素を含む配列を区切り文字なしで結合します。
arrays.join_string(["foo", "bar"]) = "foobar"
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-07-29 UTC。
[[["わかりやすい","easyToUnderstand","thumb-up"],["問題の解決に役立った","solvedMyProblem","thumb-up"],["その他","otherUp","thumb-up"]],[["わかりにくい","hardToUnderstand","thumb-down"],["情報またはサンプルコードが不正確","incorrectInformationOrSampleCode","thumb-down"],["必要な情報 / サンプルがない","missingTheInformationSamplesINeed","thumb-down"],["翻訳に関する問題","translationIssue","thumb-down"],["その他","otherDown","thumb-down"]],["最終更新日 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\""]]