Skip to content

dos_strmid

Dale Fugier edited this page Jul 1, 2026 · 1 revision

Extracts the middle part of a string (like the Basic MID$ function).

Syntax

(dos_strmid string index [count])

Parameters

string

A string.

index

The zero-based index of the first character in string that is to be included in the extracted substring.

count

The number of characters to extract from string. If this parameter is not supplied, then the remainder of string is extracted.

Returns

A string that contains a copy of the specified range of characters if successful.

nil on error.

Example

Command: (dos_strmid "AutoCAD 2006" 8)
"2006"

Command: (dos_strmid "AutoCAD 2006" 4 3)
"CAD"

Clone this wiki locally