# Character handling functions

| Function | Random masking | Consistent masking | Format-preserving encryption | Input data validation |
| --- | --- | --- | --- | --- |
| Replace all | Yes | Yes | Yes | No |
| Replace the first n characters | Yes | Yes | Yes | No |
| Replace the last n characters | Yes | Yes | Yes | No |
| Replace characters between two positions | Yes | Yes | Yes | No |
| Replace all letters | Yes | Yes | Yes | No |
| Replace all digits | Yes | Yes | Yes | No |
| Keep the first n digits and replace following ones | Yes | Yes | Yes | No |
| Keep the last n digits and replace following ones | Yes | Yes | Yes | No |
| Keep characters between two positions | Yes | No | No | No |
| Remove the first n characters | Not applicable | Not applicable | Not applicable | Not applicable |
| Remove the last n characters | Not applicable | Not applicable | Not applicable | Not applicable |
| Remove characters between two positions | Not applicable | Not applicable | Not applicable | Not applicable |

### In this section

* [Replace all](https://help.qlik.com/talend/en-US/components/8.0/data-privacy/replace-all)
* [Replace the first n characters](https://help.qlik.com/talend/en-US/components/8.0/data-privacy/replace-first-n-chars)
* [Replace the last n characters](https://help.qlik.com/talend/en-US/components/8.0/data-privacy/replace-last-n-chars)
* [Replace characters between two positions](https://help.qlik.com/talend/en-US/components/8.0/data-privacy/replace-characters-between-two-positions)
* [Replace all letters](https://help.qlik.com/talend/en-US/components/8.0/data-privacy/replace-all-letters)
* [Replace all digits](https://help.qlik.com/talend/en-US/components/8.0/data-privacy/replace-all-digits)
* [Keep the first n digits and replace following ones](https://help.qlik.com/talend/en-US/components/8.0/data-privacy/keep-first-n-digits-and-replace-following-ones)
* [Keep the last n digits and replace previous ones](https://help.qlik.com/talend/en-US/components/8.0/data-privacy/keep-last-n-digits-and-replace-previous-ones)
* [Keep characters between two positions](https://help.qlik.com/talend/en-US/components/8.0/data-privacy/keep-characters-between-two-positions)
* [Remove characters between two positions](https://help.qlik.com/talend/en-US/components/8.0/data-privacy/remove-characters-between-two-positions)
* [Remove the first n characters](https://help.qlik.com/talend/en-US/components/8.0/data-privacy/remove-first-n-chars)
* [Remove the last n chars](https://help.qlik.com/talend/en-US/components/8.0/data-privacy/remove-last-n-chars)