컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
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"
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 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\""]]