string-procs.scm 443 B

12345678910111213141516171819
  1. (library (lib string-procs)
  2. (export string-format)
  3. (import
  4. (except (rnrs base) let-values map error)
  5. (only (guile)
  6. lambda* λ
  7. simple-format
  8. call-with-output-string)
  9. ;; (ice-9 textual-ports)
  10. ))
  11. (define string-format
  12. (λ (format-string . args)
  13. (call-with-output-string
  14. (λ (string-port)
  15. (apply simple-format
  16. (cons string-port (cons format-string args)))))))