Add documentation
This commit is contained in:
parent
222808c4bb
commit
f8c54e1ce3
1 changed files with 47 additions and 0 deletions
47
abbrev.svnwiki
Normal file
47
abbrev.svnwiki
Normal file
|
|
@ -0,0 +1,47 @@
|
||||||
|
== abbrev
|
||||||
|
|
||||||
|
[[toc:]]
|
||||||
|
|
||||||
|
=== Description
|
||||||
|
|
||||||
|
Calculate the set of unique abbreviations for a list of strings.
|
||||||
|
This library is a port of the equivalent Ruby library.
|
||||||
|
|
||||||
|
=== Authors
|
||||||
|
|
||||||
|
Original Snow library: Peter Lane
|
||||||
|
|
||||||
|
Chicken port: [[/users/lilianna-smolska|Lilianna Smólska]]
|
||||||
|
|
||||||
|
=== Repository
|
||||||
|
|
||||||
|
[[https://git.linuxposting.xyz/afiw/chicken-abbrev]]
|
||||||
|
|
||||||
|
=== API
|
||||||
|
|
||||||
|
==== abbrev
|
||||||
|
|
||||||
|
<procedure>(abbrev strings #!optional prefix)</procedure>
|
||||||
|
|
||||||
|
Returns an association list mapping unique abbreviations to the matching string.
|
||||||
|
If prefix is present, only includes abbreviations that have that prefix.
|
||||||
|
|
||||||
|
=== Examples
|
||||||
|
|
||||||
|
<enscript highlight="scheme">
|
||||||
|
(import (chicken base) (abbrev))
|
||||||
|
(define abbrevs (abbrev '("scheme" "scala" "lisp")))
|
||||||
|
(alist-ref "sch" abbrevs string=?) ; => "scheme"
|
||||||
|
</enscript>
|
||||||
|
|
||||||
|
=== Changelog
|
||||||
|
|
||||||
|
* 0.1 - Initial port from original Snow library
|
||||||
|
|
||||||
|
=== License
|
||||||
|
|
||||||
|
SPDX-License-Identifier: LicenseRef-OWL-0.9.4
|
||||||
|
SPDX-FileCopyrightText: 2017 Peter Lane
|
||||||
|
SPDX-FileCopyrightText: 2025 afiw <afiw@linuxposting.xyz>
|
||||||
|
|
||||||
|
See COPYING file for full license text.
|
||||||
Loading…
Add table
Add a link
Reference in a new issue