Remove string-repeat.

This commit is contained in:
Dominik Pantůček 2023-06-24 21:57:10 +02:00
parent f297e876cc
commit a576779891

View file

@ -28,8 +28,6 @@
(module (module
util-string util-string
( (
string-repeat
string-first+rest string-first+rest
string-utf8? string-utf8?
@ -48,15 +46,6 @@
(chicken irregex) (chicken irregex)
testing) testing)
;; Repeats given string.
(define (string-repeat str rep)
(let loop ((rep rep)
(res '()))
(if (> rep 0)
(loop (sub1 rep)
(cons str res))
(string-intersperse res ""))))
;; Extracts first token and the rest as separate string ;; Extracts first token and the rest as separate string
(define (string-first+rest str) (define (string-first+rest str)
(let ((dm (irregex-search (irregex "[ \\t]" 'u) str))) (let ((dm (irregex-search (irregex "[ \\t]" 'u) str)))