Allgemeine Funktionen
| Name | Beschreibung |
CONCAT
|
Verkettet zwei oder mehr Werte desselben Typs. |
LENGTH
|
Berechnet die Länge von String, Bytes, Array, Vector oder Map.
|
REVERSE
|
Kehrt eine String-, Bytes- oder Array-Transaktion um.
|
Kundenbeispiele
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
Syntax:
concat[T <: STRING | BYTES | ARRAY](values:T ...) -> T
Beschreibung:
Verkettet zwei oder mehr Werte desselben Typs.
Beispiele:
| Werte | concat(values) |
|---|---|
| „abc“, „def“ | "abcdef" |
| [1, 2], [3, 4] | [1, 2, 3, 4] |
| b"abc", b"def" | b"abcdef" |
| „abc“, [1,2,3], „ghi“ | Fehler |
| [1,2,3] | Fehler |
| "abc", null | null |
LENGTH
Syntax:
length[T <: STRING | BYTES | ARRAY | VECTOR | MAP](value: T) -> INT64
Beschreibung:
Berechnet die Länge eines String-, Bytes-, Array-, Vector- oder Map-Werts.
Beispiele:
| Wert | length(value) |
|---|---|
| „hallo“ | 5 |
| [1, 2, 3, 4] | 4 |
| b"abcde" | 5 |
| Null | null |
| 1 | Fehler |
REVERSE
Syntax:
reverse[T <: STRING | BYTES | ARRAY](value: T) -> T
Beschreibung:
Kehrt einen String-, Bytes- oder Array-Wert um.
Beispiele:
| Wert | reverse(value) |
|---|---|
| „hallo“ | „olleh“ |
| [1, 2, 3] | [3, 2, 1] |
| b"abc" | b"cba" |
| 23 | Fehler |
| null | null |