Function Entry: VL-STRING-POSITION

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

Function Entry: VL-STRING-POSITION

Name

vl-string-position

Class

Visual LISP Function

Syntax

(vl-string-position char string [start-pos [from-end]])

Arguments and Values

  • char: integer character code
  • string: target string
  • start-pos: optional integer starting position; 0 if omitted
  • from-end: optional reverse-search flag

Description

Searches for a character within a string and returns its position.

Return Values

Index of the matching character, or nil.

Side Effects

None.

Compatibility

Character/index semantics are potentially version-sensitive in Unicode-aware hosts.

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 zero-based indexing: the first character is at position 0.
  • Autodesk documents that when from-end is T, the search proceeds backward from the end of the string toward start-pos.
  • Autodesk documents an AutoCAD 2021 change from ASCII character codes to Unicode character codes when LISPSYS selects the Unicode engine.