GetToken

Name

GetToken

Syntax

GetToken (String str, String delimiter, Integer tokenIndex)

Purpose

To retrieve the specified token in a string delimited by ‘delimiter’.

Description

Retrieves the specified token in a string delimited by ‘delimiter’.

Return Type

String

Parameters

str [System.String] – a string

delimiter [System.String] – Delimited string (delimiter)

tokenIndex [System.Int32]

Example

In this example, we are passing the required parameters to the function transformation object using a Variables object.

Where,

str = A-B-C-D-E

delimiter = -

tokenIndex = 2

Right-click on the function transformation object and select Preview Output. You can see that Astera Data Stack has returned the string value, indicating the token in index position 2.

© Copyright 2023, Astera Software