コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
arrays.size
arrays.size( array )
説明
配列のサイズを返します。空の配列の場合は 0 を返します。
パラメータのデータ型
ARRAY_STRINGS|ARRAY_INTS|ARRAY_FLOATS
戻り値の型
INT
コードサンプル
例 1
この例では、2 つの要素を含む文字列配列を使用します。
arrays.size(["test1", "test2"]) = 2
例 2
この例では、3 つの要素を含む整数配列を使用します。
arrays.size([1, 2, 3]) = 3
例 3
この例では、1 つの要素を含む浮動小数点配列を使用します。
arrays.size([1.200000]) = 1
例 4
この例では空の配列を使用します。
arrays.size([]) = 0
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 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.size\u003c/code\u003e function calculates and returns the number of elements within an array.\u003c/p\u003e\n"],["\u003cp\u003eThis function supports arrays containing strings, integers, or floats.\u003c/p\u003e\n"],["\u003cp\u003eAn empty array passed to \u003ccode\u003earrays.size\u003c/code\u003e will result in a return value of 0.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003earrays.size\u003c/code\u003e can be found within the Rules and Search sections of the documentation.\u003c/p\u003e\n"]]],[],null,["### arrays.size\n\nSupported in: \n[Rules](/chronicle/docs/detection/default-rules) [Search](/chronicle/docs/investigation/udm-search) \n\n arrays.size( array )\n\n#### Description\n\nReturns the size of the array. Returns 0 for an empty array.\n\n#### Param data types\n\n`ARRAY_STRINGS|ARRAY_INTS|ARRAY_FLOATS`\n\n#### Return type\n\n`INT`\n\n#### Code samples\n\n##### Example 1\n\nThis example uses a string array that contains two elements. \n\n arrays.size([\"test1\", \"test2\"]) = 2\n\n##### Example 2\n\nThis example uses an int array that contains 3 elements. \n\n arrays.size([1, 2, 3]) = 3\n\n##### Example 3\n\nThis example uses a float array thats contains 1 elements \n\n arrays.size([1.200000]) = 1\n\n##### Example 4\n\nThis example uses an empty array. \n\n arrays.size([]) = 0"]]