From f8c54e1ce3426c8ed3059f944205c646d1ed58c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?c=C3=A6l=C5=8Drum=20spect=C4=81tr=C4=ABx?= Date: Thu, 4 Dec 2025 12:27:39 +0100 Subject: [PATCH] Add documentation --- abbrev.svnwiki | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 abbrev.svnwiki diff --git a/abbrev.svnwiki b/abbrev.svnwiki new file mode 100644 index 0000000..6ee11d6 --- /dev/null +++ b/abbrev.svnwiki @@ -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 + +(abbrev strings #!optional prefix) + +Returns an association list mapping unique abbreviations to the matching string. +If prefix is present, only includes abbreviations that have that prefix. + +=== Examples + + +(import (chicken base) (abbrev)) +(define abbrevs (abbrev '("scheme" "scala" "lisp"))) +(alist-ref "sch" abbrevs string=?) ; => "scheme" + + +=== 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 + +See COPYING file for full license text.