汎用関数
| 名前 | 説明 |
CONCAT
|
同じ型の 2 つ以上の値を連結します。 |
LENGTH
|
String、Bytes、Array、Vector、Map の長さを計算します。 |
REVERSE
|
String、Bytes、Array を反転します。 |
お客様の事例
Node.js
concat(constant("Author ID: "), field("authorId"));
Web
concat(constant("Author ID: "), field("authorId"));
Swift
let displayString = Constant("Author ID: ").concat([Field("authorId")])
Kotlin
val displayString = constant("Author ID: ").concat(field("authorId"))
Java
Expression displayString = constant("Author ID: ").concat(field("authorId"));
Python
Constant.of("Author ID: ").concat(Field.of("authorId"))
CONCAT
構文:
concat[T <: STRING | BYTES | ARRAY](values:T ...) -> T
説明:
同じ型の 2 つ以上の値を連結します。
例:
| values | concat(values) |
|---|---|
| "abc", "def" | "abcdef" |
| [1, 2], [3, 4] | [1, 2, 3, 4] |
| b"abc", b"def" | b"abcdef" |
| "abc", [1,2,3], "ghi" | エラー |
| [1,2,3] | エラー |
| "abc", null | null |
LENGTH
構文:
length[T <: STRING | BYTES | ARRAY | VECTOR | MAP](value: T) -> INT64
説明:
String、Bytes、Array、Vector、Map の値の長さを計算します。
例:
| 値 | length(value) |
|---|---|
| "hello" | 5 |
| [1, 2, 3, 4] | 4 |
| b"abcde" | 5 |
| null | null |
| 1 | エラー |
REVERSE
構文:
reverse[T <: STRING | BYTES | ARRAY](value: T) -> T
説明:
String、Bytes 値または Array 値を元に戻します。
例:
| 値 | reverse(value) |
|---|---|
| "hello" | "olleh" |
| [1, 2, 3] | [3, 2, 1] |
| b"abc" | b"cba" |
| 23 | エラー |
| null | null |