Function Entry: SUBSTR

← Prev | ↑ Chapter | Next → | Index | Symbols

Function Entry: SUBSTR

Name

substr

Class

Function

Syntax

(substr string start [length])

Arguments and Values

  • string — string
  • start — positive integer starting position
  • length — optional positive integer substring length

Description

Returns a substring of string.

Return Values

String.

Side Effects

None.

Compatibility

String indexing and character-unit semantics are version-sensitive in Unicode-era environments.

Availability

  • AutoCAD 2026: documented (per Autodesk reference page).
  • BricsCAD V26: presumed compatible (no contradicting page found).
  • Status: AutoCAD documented; BricsCAD presumed-both pending Phase 4 verification.

Notes

  • Autodesk documents 1-based indexing: the first character of the string is position 1.
  • If length is omitted, Autodesk documents that the substring extends to the end of the string.