MIDF$

<< Click to Display Table of Contents >>

Navigation:  ThinBASIC Core Language > BuiltIn Functions > String functions >

MIDF$

 

Description

 

FAST version of MID$ function working on scalar string variable only!

Return a portion of a string.

 

Syntax

 

s = MIDF$(StringVariable, Start , Length)

 

Returns

 

String

 

Parameters

 

Name

Type

Optional

Meaning

StringVariable

Variable

No

IMPORTANT: a scalar string variable.

 

This parameter can only be:

a single global or local string variable

a string element of a user defined type (UDT)

 

Start

Number

No

Position where extraction will start

Lenght

Number

No

Number of chars to return

 

Remarks

 

If there are fewer than length characters to the right of the Start character of StringVariable, all remaining characters of StringVariable, including the Start character, are returned.

 

Restrictions

 

If Start evaluates to a position outside of the string on either side, or if Start is zero, an empty string is returned.

 

See also

 

String Handling, MID$, MIDF$, LEFT$, RIGHT$,

 

Examples