aboutsummaryrefslogtreecommitdiff
path: root/src/ellinika/elmorph.scm4
diff options
context:
space:
mode:
Diffstat (limited to 'src/ellinika/elmorph.scm4')
-rw-r--r--src/ellinika/elmorph.scm410
1 files changed, 8 insertions, 2 deletions
diff --git a/src/ellinika/elmorph.scm4 b/src/ellinika/elmorph.scm4
index e3ed4b5..f916d1c 100644
--- a/src/ellinika/elmorph.scm4
+++ b/src/ellinika/elmorph.scm4
@@ -21,20 +21,26 @@
"scm_init_ellinika_elmorph_module")
(define-public (elstr-trim word n)
+ (let ((word (if (string? word)
+ (string->elstr word)
+ word)))
(cond
((> n 0)
(elstr-slice word n (- (elstr-length word) n)))
((< n 0)
(elstr-slice word 0 (+ (elstr-length word) n)))
(else
- word)))
+ word))))
(define-public (elstr-trim! word n)
+ (let ((word (if (string? word)
+ (string->elstr word)
+ word)))
(cond
((> n 0)
(elstr-slice! word n (- (elstr-length word) n)))
((< n 0)
- (elstr-slice! word 0 (+ (elstr-length word) n)))))
+ (elstr-slice! word 0 (+ (elstr-length word) n))))))

Return to:

Send suggestions and report system problems to the System administrator.