std-string-remove-comments | ![]() |
STD-STRING-REMOVE-COMMENT
removes lisp like comments from strings, to allow comments in data files which could be read by a lisp evaluator. read would skip comments too but not all data files must follow a lisp syntax, but should allow comments.
Nested inline comments (;| xx;|xx|;|;) are not allowed, but inline comments inside ";" (; xx ;||;) are. It is not defined yet if the function throws an error on nested inline comments or returns a result which may be correct or wrong.
(std-string-remove-comment ";;; test ") => "" (std-string-remove-comment "(setq test nil) ; test") => "(setq test nil) " (std-string-remove-comment "(setq ;|test_var|;test nil) ; test") => "(setq test nil) "
str: a string.
A string.
None.
(std-require 'STDSTR)
Defined in STDSTR