This commit is contained in:
Joel Wetzell
2026-05-17 21:12:04 -05:00
parent 69bc31d3f1
commit 8e6cd58006
82 changed files with 642 additions and 450 deletions
@@ -1,19 +1,22 @@
---
title: Create String
sidebar:
label: Create
order: 3
label: Create
order: 3
---
The `string.create` processor creates a string based on the provided template. This processor will return an error if there is an issue executing the template. The template property is just a [Go template](https://pkg.go.dev/text/template) that will be evaluated with the incoming message provided as an environment.
- **type**: `string.create`
- **params**:
- **template**: string template that will have the incoming message as the context
- **template**: string template that will have the incoming message as the context
### Example
This would create a string using the `Address` property of the incoming message like and OSC message
```yaml
- type: string.create
params:
params:
template: "{{.Address}}
```
```
@@ -1,14 +1,16 @@
---
title: Decode String
sidebar:
label: Decode
order: 1
label: Decode
order: 1
---
The `string.decode` processor takes a array of bytes and turn it into string. This processor will return an error if the message being processed is not an array of bytes.
- **type**: `string.decode`
### Example
```yaml
- type: string.decode
```
```
@@ -1,14 +1,16 @@
---
title: Encode String
sidebar:
label: Encode
order: 2
label: Encode
order: 2
---
The `string.encode` processor takes a string and turns it into an array of bytes. This processor will return an error if the message being processed is not a string.
- **type**: `string.encode`
### Example
```yaml
- type: string.encode
```
```
+6 -4
View File
@@ -1,20 +1,22 @@
---
title: Split String
sidebar:
label: Split
order: 5
label: Split
order: 5
---
The `string.split` processor takes a string and turns it into an array of strings by splitting on `params.separator`. This processor will return an error if the message being processed is not a string.
- **type**: `string.split`
- **params**:
- **pattern**: string to split incoming string on
- **pattern**: string to split incoming string on
### Example
Split incoming string on `,` i.e `"one,two,three"` -> `["one","two","three"]`
```yaml
- type: string.split
params:
separator: ","
```
```