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. |
![](https://documentation.astera.com/~gitbook/image?url=https%3A%2F%2Fgithub.com%2Fastera-software%2FAstera_Data_Stack_v9%2Fblob%2Fmain%2F.gitbook%2Fassets%2Fproperties%25201618232930101.png&width=768&dpr=4&quality=100&sign=a1b7ee9&sv=1)
Example
In this example, we have are passing the required parameters using a Variables object where:
str = ABCDEFGH
charsToRemove = ABC
![](https://documentation.astera.com/~gitbook/image?url=https%3A%2F%2Fgithub.com%2Fastera-software%2FAstera_Data_Stack_v9%2Fblob%2Fmain%2F.gitbook%2Fassets%2Fdataflow%2520%287%29.png&width=768&dpr=4&quality=100&sign=758691b1&sv=1)
Right-click on the function transformation object and select Preview Output. You can see that the specified characters in charsToRemove have been removed.