Common Operations
str_strip
Deletes specified characters from a string.
- Format
str_strip(value, chars)
- Parameter description
Parameter
Type
Mandatory
Description
value
Any (automatically converted to string)
Yes
Original string to be modified.
chars
Any (automatically converted to string)
No
Character set to be deleted at the beginning and end of a character string. The default value is \t\r\n.
- Returned result
Modified string.
- Function example
- Example 1: Deletes spaces.
- Test data
{ "source":" lts" }
- Processing rule
e_set("str_strip", str_strip(v("source")))
- Processing result
source: lts str_strip: lts
- Test data
- Example 2: Deletes # characters at the beginning and end of a string.
- Test data
{ "source": "##lts#" }
- Processing rule
e_set("str_strip", str_strip(v("source"), "#"))
- Processing result
"source": "##lts#" str_strip: lts
- Test data
- Example 1: Deletes spaces.
str_lstrip
Deletes specified characters at the beginning of a string.
- Format
str_lstrip(value, chars)
- Parameter description
Parameter
Type
Mandatory
Description
value
Any (automatically converted to string)
Yes
Original string to be modified.
chars
Any (automatically converted to string)
No
Character set to be deleted at the beginning of a character string. The default value is a space.
- Returned result
Modified string.
- Function example
- Test data: none
- Processing rule
e_set("str_strip", str_lstrip("**123**", "*"))
- Processing result
str_strip: 123**
str_rstrip
Deletes specified characters at the end of a string.
- Format
str_rstrip(value, chars)
- Parameter description
Parameter
Type
Mandatory
Description
value
Any (automatically converted to string)
Yes
Original string to be modified.
chars
Any (automatically converted to string)
No
Character set to be deleted at the end of a character string. The default value is a space.
- Returned result
Modified string.
- Function example
- Test data: none
- Processing rule
e_set("str_strip", str_rstrip("**123**", "*"))
- Processing result
str_strip: 123**
str_lower
Converts all uppercase characters in a string to lowercase characters.
- Format
str_lower(value)
- Parameter description
Parameter
Type
Mandatory
Description
value
Any (automatically converted to string)
Yes
String to be converted.
- Returned result
String after conversion.
- Function example
- Test data
{ "name": "LTs" }
- Processing rule
e_set("str_lower", str_lower(v("name")))
- Processing result
name: LTs str_lower: lts
- Test data
str_upper
Converts all lowercase characters in a string to uppercase characters.
- Format
str_upper(value)
- Parameter description
Parameter
Type
Mandatory
Description
value
Any (automatically converted to string)
Yes
String to be converted.
- Returned result
String after conversion.
- Function example
- Test data
{ "name": "LTs" }
- Processing rule
e_set("str_upper", str_upper(v("name")))
- Processing result
name: LTs str_upper: LTS
- Test data
str_title
Converts the first letter of each word in a string to uppercase and the other letters to lowercase.
- Format
str_title(value)
- Parameter description
Parameter
Type
Mandatory
Description
value
Any (automatically converted to string)
Yes
String to be converted.
- Returned result
String after conversion.
- Function example
- Test data
{ "name": "for example" }
- Processing rule
e_set("str_title", str_title(v("name")))
- Processing result
name:for example example str_title: For Exampl
- Test data
str_capitalize
Converts the first letter of a string to uppercase and the other letters to lowercase.
- Format
str_capitalize(value)
- Parameter description
Parameter
Type
Mandatory
Description
value
Any (automatically converted to string)
Yes
String to be converted.
- Returned result
String after conversion.
- Function example
- Test data
{ "value": "welcome to xian" }
- Processing rule
e_set("str_capitalize", str_capitalize(v("value")))
- Processing result
value: welcome to xian str_capitalize: Welcome to xian
- Test data
str_swapcase
Converts the uppercase and lowercase letters of a string.
- Format
str_swapcase(value)
- Parameter description
Parameter
Type
Mandatory
Description
value
Any (automatically converted to string)
Yes
String to be converted.
- Returned result
String after conversion.
- Function example
- Test data
{ "name": "this is lts" }
- Processing rule
e_set("str_swapcase", str_swapcase(v("name")))
- Processing result
name: this is lts str_swapcase: THIS IS LTS
- Test data
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot