# String Trim Suffix

> Remove a suffix from a string.

- ID: `string_trim_suffix`
- 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_suffix(Args{...})`.

**Inputs**

| Name | Required | Description | Value |
| --- | --- | --- | --- |
| `text` | yes | String to trim. | e.g. `"valueSuffix"` |
| `suffix` | yes | Suffix to remove. | e.g. `"Suffix"` |

**Outputs**

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

**Example**

```go
stringTrimSuffix := string_trim_suffix(Args{text: "valueSuffix", suffix: "Suffix"})
send_text_message(Args{
	channel_id:      trigger.channel_id,
	message_content: "String: " + stringTrimSuffix,
})
```