split
Generally, the split function is used together with the select or get_list_length function. The split function is mainly used in the following scenarios:
- A string is split into a group of strings so that specific elements can be easily obtained from the result string list.
- A result string array is directly used.
Syntax
split: [delimiter, sourceString ]
Parameters
Parameter |
Description |
---|---|
delimiter |
Separator, which can be a string, single character, or variable obtained using the get_input function. |
sourceString |
Original string, which can be a variable obtained using the get_input function. Original strings are grouped by separators. |
Return Values
Split string arrays are returned.
Examples
The following describes how to use the split function to group strings:
inputs: source: default: "a,b,c,d,e,f,g" node_templates: test: type: Cloud.AOS.Stack properties: templateId: "abcdf-fdeee" inputs: aaa: {select: [0, {split: [",", {get_input: source}]}]} # The value is a.
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