# RemoveChars (String str, String charsToRemove)

| Name                     | *RemoveChars*                                                                                                                            |
| ------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------- |
| Applicable To (DataType) | String                                                                                                                                   |
| Purpose                  | To remove the occurrences of a character specified in *charsToRemove* parameter.                                                         |
| Description              | Removes all occurrences of any character specified in *charsToRemove* parameter.                                                         |
| Return Type              | String                                                                                                                                   |
| Syntax                   | str \[System.String] – string to remove characters from                                                                                  |
|                          | charsToRemove \[System.String] – string containing characters to be removed. Any character found in the string will be removed from str. |

![properties](https://github.com/astera-software/Astera_Data_Stack_v9/blob/main/.gitbook/assets/properties%201618232930101.png)

## Example

In this example, we have are passing the required parameters using a *Variables* object where:

*str* = ABCDEFGH

*charsToRemove* = ABC

![dataflow](https://github.com/astera-software/Astera_Data_Stack_v9/blob/main/.gitbook/assets/dataflow%20\(7\).png)

Right-click on the function transformation object and select *Preview Output*. You can see that the specified characters in *charsToRemove* have been removed.

![output](https://github.com/astera-software/Astera_Data_Stack_v9/blob/main/.gitbook/assets/output%20\(5\).png)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://documentation.astera.com/astera-data-stack-v8/functions/string/removechars-string-str-string-charstoremove.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
