Skip to main content
CloudStudio

StringPart

The StringPart function returns a part of a string that contains sub-strings.

Definition

StringPart(texto, posicion, separador)

Parameters

NameDescriptionData type
textoThe first parameter refers to the text string.string
posicionPosition of the element to obtain within the text, starting at 1.numeric
separadorSeparator used to distinguish the parts of the text.string

Example

The following example shows how to get the third element from the text 'Temperatura/exterior/33', where the parts are separated by '/'.

StringPart('Temperatura/exterior/33', 3, '/')

The result is '33' (string).

Additional notes

If the function is used to obtain a part that does not exist (i.e., when the text contains fewer parts), the function returns an empty string. For example, in the following case, the result of the function is an empty string.

StringPart('Temperatura/exterior/33', 6, '/')

The result is an empty string ('') because the sixth part is requested, but the string contains only 3 parts.

Last updated on

On this page