Entering content frame

Background documentation strSub Function Locate the document in its SAP Library structure

Purpose

Returns a substring from a given string.

Syntax

string strSub (in string string,
in int position,
in int length)

Parameters

string

Expression evaluating to a string.

position

Starting position of the substring within string [1..n].

length

Number of characters to put into the substring starting at position .

Description

When you can specify the starting position position and length length , strSub returns the length length , starting at the position you request.

Return Value

Returns a substring (a copy) of the given string.

Example

`name = "Walt Whitman"`
The last name of `name` is
`if (0 != (j = strstr (name, " ")))`
  `strSub (name, j + 1, 0)`
`else`
  undefined.
`end`

Leaving content frame