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 codestring: target stringstart-pos: optional integer starting position;0if omittedfrom-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.
Source Notes
- [vl-string-position (AutoLISP)](https://help.autodesk.com/cloudhelp/2023/ENU/AutoCAD-AutoLISP-Reference/files/GUID-2B0BF48B-FA26-431B-8EC3-DD0BD9F147A0.htm)
- Status: documented.
Notes
- Autodesk documents zero-based indexing: the first character is at position
0. - Autodesk documents that when
from-endis T, the search proceeds backward from the end of the string towardstart-pos. - Autodesk documents an AutoCAD 2021 change from ASCII character codes to Unicode character codes when
LISPSYSselects the Unicode engine.