Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

1. Description

Allows manipulation of strings.

This component is present in flow types like:

  • Voice;
  • Chat;
  • Forms;
  • Service.

The block (Fig.1(1)) is used in space to build the Flow. The settings panel for this component opens (Fig.1(2)) when you click on the block.

Fig.1. String component

1.1. String block

The block consists of the following elements:

  1. The name of the component;
  2. in branch - receiving (connecting with the previous block) branch;
  3. out branch - outgoing (connecting with the following block) branch.

1.2. String settings panel

It consists of the following elements:

  1. ;
  2. ;
  3. Method;
  4. ;

  5. Break;
  6. Add limit.

Here the name of the new variable is entered into which the result will be written.

Here you enter a variable with which you need to do manipulations.

1.2.3. Method

It is designed to select the method of manipulation. The following options are available:

  • length - returns the length of the string;
  • indexOf - returns the index of the first occurrence of the entered value in the String object on which it was called. Returns -1 if the value is not found;
  • search - searches a string for the entered value and returns the position of the match. The search value can be a string or a regular expression. This method returns -1 if no match is found;
  • slice - extracts text from one line and returns a new string;
  • substring - similar to slice. The difference is that a substring cannot take negative indices;
  • substr - similar to slice. The difference is that the second parameter specifies the length of the extracted part;
  • replace - replaces the entered value with another value in the string;
  • toUpperCase - the string is converted to upper case;
  • charAt - returns the character at the specified index (position) in the string;
  • charCodeAt - returns the Unicode character at the specified index in the string;
  • split - a string can be converted to an array using the split function;
  • reverse - reverse the provided string;
  • base64 - base64 encoder/decoder;
  • MD5 - calculates a digest from a string using the MD5 algorithm;
  • SHA-256 - calculates a digest from a string using the SHA-256 algorithm;
  • SHA-512 - calculates a digest from a string using the SHA-512 algorithm;

Here you can enter an argument that is required for some methods.

1.2.5. Break

Responsible for the completion of the flow execution.

- initiates the end of the flow execution after the given component.

- the switch is in the off position.

1.2.6. Add limit

Unable to render {include} The included page could not be found.

Fig. 2. Setting a limit

  • No labels