aboutsummaryrefslogtreecommitdiff
path: root/module/hnh
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2022-04-24 01:56:12 +0200
committerHugo Hörnquist <hugo@lysator.liu.se>2022-04-24 01:56:16 +0200
commitb1a749ca8cf7dd1f49d8c79f7c65e0ec4e876747 (patch)
tree8542f9da8140975219010aa5309d88fabee62fe0 /module/hnh
parentDead code removal. (diff)
downloadcalp-b1a749ca8cf7dd1f49d8c79f7c65e0ec4e876747.tar.gz
calp-b1a749ca8cf7dd1f49d8c79f7c65e0ec4e876747.tar.xz
Introduce filename-extension procedure.
Diffstat (limited to 'module/hnh')
-rw-r--r--module/hnh/util/path.scm3
1 files changed, 3 insertions, 0 deletions
diff --git a/module/hnh/util/path.scm b/module/hnh/util/path.scm
index 0aa747d0..49b53897 100644
--- a/module/hnh/util/path.scm
+++ b/module/hnh/util/path.scm
@@ -57,3 +57,6 @@
(define base (basename path))
(and (not (string-null? base))
(char=? #\. (string-ref base 0))))
+
+(define-public (filename-extension filename)
+ (car (reverse (string-split filename #\.))))