https://github.com/stylewarning/cl-string-complete
https://github.com/stylewarning/cl-string-complete
Last synced: 5 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/stylewarning/cl-string-complete
- Owner: stylewarning
- License: bsd-3-clause
- Created: 2023-04-09T22:07:05.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2023-04-09T22:18:06.000Z (about 3 years ago)
- Last Synced: 2025-03-25T23:34:10.400Z (over 1 year ago)
- Language: Common Lisp
- Size: 7.81 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README
- License: LICENSE
Awesome Lists containing this project
README
#+TITLE: The =CL-STRING-COMPLETE= String Completion Library
#+AUTHOR: Robert Smith
#+EMAIL: quad@symbo1ics.com
* Summary
A small library for string completion by Robert Smith.
* Usage
The principle use follows.
Create a completion tree:
: > (defparameter *tree* (make-completion-tree))
Add your words to it:
: > (completion-tree-add *tree* "hello")
: > (completion-tree-add* *tree* "helmet"
: "help"
: "helsinki")
Check if something exists in the tree:
: > (completion-tree-contains-p *tree* "hello")
: T
: > (completion-tree-contains-p *tree* "hexagon")
: NIL
Compute the completions of a character:
: > (compute-completions *tree* #\h)
: ("ello" "elmet" "elp" "elsinki")
: > (compute-completions *tree* #\x)
: NIL
Compute the completions of a string:
: > (compute-completions *tree* "hel")
: ("lo" "met" "sinki" "p")
* Dependencies
None.
* License
See the file ~LICENSE~.
----------
### End of file