Check if a string contains a specified substring

Updated at:

1. Component overview

Note

Prerequisites: None

This component checks if a string contains a specified substring.

2. Inputs

Note

For more information about the input parameters, see the component's help text in the application flow editor.

3. Outputs

Note

For more information about the output parameters, see the component's help text in the application flow editor.

4. Component usage example

4.1. Configuration example

  1. For Target String, select a string variable from the drop-down list.

  2. Set Target string to "Alibaba Cloud".

  3. Keep the default values for the advanced options.

4.2. Example result

None

5. Example flow

Setup flow

  1. Use the Set Variable Value component to set the value of a string variable.

  2. Use the Check if a string contains a specified substring component to check if the string contains the substring.

  3. Use the Record Log component to print the value returned by the Check if a string contains a specified substring component.

Execution result

After the flow runs, the result is printed in the log panel, as shown in the following figure.

image