===String editing on-screen for VT compatible Terminals===
StrEdit$() allows the user to edit (or enter - start with "") a string at a given position in a terminal window and constrained to a specified length. It is a more intelligent version of Input in that it performs the same function but is non-blocking (with Input
, your program loses control while it waits for the user), limits the amount of data, provides nice editing and nice displays reminiscent of the 80s & 90s terminal based input.
Your terminal emulator must be VT compliant to understand the ANSI codes (I use PuTTY)
===Dependancies===
*Option Base 0
*[[vb_work_a_like_ltrim_and_rtrim_functions|LTrim and RTrim Functions (VB work-a-like)]] or the equivalent [[ltrim_rtrim_cfunctions|LTrim RTrim CFunctions]] (note this latter does not treat TABs as white-space and so are not trimmed).
*[[simple_screen_control_for_ansi_based_consoles_vt100_etc|VT Console Pack. Screen Positioning, Sane Key Scanning And a String Editing Routine]]
===Example Usage===
MyDT$=StrEdit$(MyDT$,10,10,8)
'Edit the string at the position given limited to q characters long
Function StrEdit$(l$,h As Integer,v As Integer,q As Integer)
Local x$,a$
a$=RTrim$(Left$(l$,q))
SStr a$,h,v
Do
Do:x$=VTKey$():Loop Until x$<>""
If Len(x$)=1 Then
Select Case Asc(x$)
Case 32 To 126
If Len(a$)