# String Trim Prefix

> Remove a prefix from a string.

- ID: `string_trim_prefix`
- Type: Block
- Category: [Strings](https://inventor.bot/docs/reference/blocks/strings.md)

- Value block: it can be used directly inside expressions, e.g. `"Result: " + string_trim_prefix(Args{...})`.

**Inputs**

| Name | Required | Description | Value |
| --- | --- | --- | --- |
| `text` | yes | String to trim. | e.g. `"prefixValue"` |
| `prefix` | yes | Prefix to remove. | e.g. `"prefix"` |

**Outputs**

| Name | Description | Value |
| --- | --- | --- |
| `string` | String without prefix. | e.g. `"Value"` |

**Example**

```go
stringTrimPrefix := string_trim_prefix(Args{text: "prefixValue", prefix: "prefix"})
send_text_message(Args{
	channel_id:      trigger.channel_id,
	message_content: "String: " + stringTrimPrefix,
})
```