Contact Us 1-800-596-4880

concatWith

concatWith(source: Binary, with: Binary): Binary

Concatenates the content of two binaries.

Introduced in DataWeave version 2.5.0.

Parameters

Name Type Description

source

Binary

The source binary content.

with

Binary

The binary to append.

Example

This example concats two binaries into one binary.

Source

%dw 2.0
import * from dw::core::Binaries
output application/dw
---
"CAFE" as Binary {base: "16"} concatWith "ABCD" as Binary {base: "16"}

Output

"yv6rzQ==" as Binary {base: "64"}

concatWith(source: Binary, with: Null): Binary

Helper function that enables concatWith to work with a null value.

concatWith(source: Null, with: Binary): Binary

Helper function that enables concatWith to work with a null value.