MID (FUN)

 

FUNCTION MID : STRING(255)

Returns a specific number of characters of a string, starting from a specific position

MID (STR, LEN, POS) means: Retrieve LEN characters from the STR string beginning with the character at position POS.

(* Example declaration *)
VarSTRING1 : STRING ;

(* Example in ST , result is 'US' *)
VarSTRING1 := MID ('SUSI',2,2);

InOut:

Scope

Name

Type

Comment

Return

MID

STRING(255)

Partial string of STR

Input

STR

STRING(255)

String to be analyzed

LEN

INT

Number of characters, counted from the left

POS

INT

Start position for the partial string