I am trying to end a while loop when vl-string-search is nil. Not sure what I'm missing here.
(defun c:foo( / txt)
;(setq txt (dos_editbox "Editor" "Enter some text" ""))
(setq txt "alpha\tbravo\ncharlie\tdelta")
(while
(princ (substr txt 1 (vl-string-search "\t" txt)))
(setq txt (substr txt (+ 2 (vl-string-search "\t" txt)) (strlen txt)))
(princ(substr txt 1 (vl-string-search "\n" txt)))
(setq txt (substr txt (+ 2 (vl-string-search "\n" txt)) (strlen txt)))
)
(princ)
)