Fixes up docstring for string-re-escape and moves a few procs to be subprocs of string-re-escape

This commit is contained in:
sloum 2023-12-02 10:47:02 -08:00
parent 6eafd45e8b
commit 18dc864340
1 changed files with 12 additions and 7 deletions

View File

@ -166,15 +166,20 @@ Notes: Converts all ascii characters in STRING to upper case |
str "" *
end
proc char-is-word?
"\\w" swap re-match?
end
proc char-is-space?
"\\s" swap re-match?
end
proc string-re-escape
| Stack: STRING
Read :
Push : STRING
Notes: Slash escapes all non-word characters for use in regex pattern as literal STRING |
proc char-is-word?
"\\w" swap re-match?
end
proc char-is-space?
"\\s" swap re-match?
end
"" / # split
STRING var! out
proc test