repeat(text: String, times: Number): String text を、指定された回数 (times) 繰り返します。 DataWeave バージョン 2.2.0 で導入されました。 パラメーター 名前 説明 text 入力文字列。 times 文字を繰り返す回数。負の値はゼロとして処理されます。 例 次の例では、さまざまな入力とサイズでの repeat の動作を示します。 ソース %dw 2.0 import * from dw::core::Strings output application/json --- { "a": repeat("e", 0), "b": repeat("e", 3), "c": repeat("e", -2) } 出力 { "a": "", "b": "eee", "c": "" } repeat(text: Null, times: Any): Null repeat を null 値に使用できるようにするヘルパー関数。 DataWeave バージョン 2.4.0 で導入されました。
repeat(text: String, times: Number): String text を、指定された回数 (times) 繰り返します。 DataWeave バージョン 2.2.0 で導入されました。 パラメーター 名前 説明 text 入力文字列。 times 文字を繰り返す回数。負の値はゼロとして処理されます。 例 次の例では、さまざまな入力とサイズでの repeat の動作を示します。 ソース %dw 2.0 import * from dw::core::Strings output application/json --- { "a": repeat("e", 0), "b": repeat("e", 3), "c": repeat("e", -2) } 出力 { "a": "", "b": "eee", "c": "" } repeat(text: Null, times: Any): Null repeat を null 値に使用できるようにするヘルパー関数。 DataWeave バージョン 2.4.0 で導入されました。