summaryrefslogtreecommitdiffabout
path: root/src/ellinika/elmorph.scm4
Unidiff
Diffstat (limited to 'src/ellinika/elmorph.scm4') (more/less context) (ignore whitespace changes)
-rw-r--r--src/ellinika/elmorph.scm430
1 files changed, 18 insertions, 12 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
@@ -23,16 +23,22 @@
23(define-public (elstr-trim word n) 23(define-public (elstr-trim word n)
24 (cond 24 (let ((word (if (string? word)
25 ((> n 0) 25 (string->elstr word)
26 (elstr-slice word n (- (elstr-length word) n))) 26 word)))
27 ((< n 0) 27 (cond
28 (elstr-slice word 0 (+ (elstr-length word) n))) 28 ((> n 0)
29 (else 29 (elstr-slice word n (- (elstr-length word) n)))
30 word))) 30 ((< n 0)
31 (elstr-slice word 0 (+ (elstr-length word) n)))
32 (else
33 word))))
31 34
32(define-public (elstr-trim! word n) 35(define-public (elstr-trim! word n)
33 (cond 36 (let ((word (if (string? word)
34 ((> n 0) 37 (string->elstr word)
35 (elstr-slice! word n (- (elstr-length word) n))) 38 word)))
36 ((< n 0) 39 (cond
37 (elstr-slice! word 0 (+ (elstr-length word) n))))) 40 ((> n 0)
41 (elstr-slice! word n (- (elstr-length word) n)))
42 ((< n 0)
43 (elstr-slice! word 0 (+ (elstr-length word) n))))))
38 44

Return to:

Send suggestions and report system problems to the System administrator.