github.com/GuanceCloud/cliutils@v1.1.21/pipeline/ptinput/funcs/md/trim.en.md (about) 1 ### `trim()` {#fn-trim} 2 3 Function prototype: `fn trim(key, cutset: str = "")` 4 5 Function description: delete the characters specified at the beginning and end of the key, and delete all blank characters by default when the `cutset` is an empty string 6 7 Function parameters: 8 9 - `key`: a field that has been extracted, string type 10 - `cutset`: Delete the first and last characters in the `cutset` string in the key 11 12 Example: 13 14 ```python 15 # Data to be processed: "trim(key, cutset)" 16 17 # process script 18 add_key(test_data, "ACCAA_test_DataA_ACBA") 19 trim(test_data, "ABC_") 20 21 # process result 22 { 23 "test_data": "test_Data" 24 } 25 ```