Skip to content

dos_strchar

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

Returns or sets the character at a given position.

Syntax

(dos_strchar string index [char])

Parameters

string

A string.

index

A zero-based index of the character in the string. The index parameter must be greater than or equal to 0 and less than the value returned by dos_strlength.

char

The character to set at the index position.

Returns

The character at the specified position if char is not specified.

The modified string if char is specified.

nil on error.

Example

Command: (dos_strchar "AutoCAD 2006" 11)
"6"

Command: (dos_strchar "AutoCAD 2006" 11 "7")
"AutoCAD 2007"

Clone this wiki locally