Check if a string ends with a specified suffix

更新时间:
复制 MD 格式

1. Component introduction

Note

Prerequisites: None

Use this component to check if a string ends with a specified suffix.

2. Inputs

Note

For details about each input, see the help text in the component panel of the ROS Visual Editor.

3. Outputs

Note

For details about each output, see the help text in the component panel of the ROS Visual Editor.

4. Component usage example

4.1. Component configuration example

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

  2. For Target suffix, enter "RPA".

  3. Keep the default advanced options.

4.2. Example execution result

None

5. Example flow

Build the flow

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

  2. Use the Check if String Ends with Suffix component to check if the string ends with the specified suffix.

  3. Use the Record Log component to print the value returned by the Check if String Ends with Suffix component.

image

Execution result

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