13.sld 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. (define-library (srfi 13)
  2. (export
  3. ;; Predicates
  4. #;string?
  5. string-null?
  6. string-every
  7. string-any
  8. ;; Constructors
  9. #;make-string
  10. #;string
  11. string-tabulate
  12. ;; List & string conversion
  13. #;string->list
  14. #;list->string
  15. reverse-list->string
  16. string-join
  17. ;; Selection
  18. #;string-length
  19. #;string-ref
  20. #;string-copy
  21. substring/shared
  22. #;string-copy!
  23. string-take
  24. string-take-right
  25. string-drop
  26. string-drop-right
  27. string-pad
  28. string-pad-right
  29. string-trim
  30. string-trim-right
  31. string-trim-both
  32. ;; Modification
  33. #;string-set!
  34. #;string-fill!
  35. ;; Comparison
  36. string-compare
  37. string-compare-ci
  38. string<>
  39. string=
  40. string<
  41. string>
  42. string<=
  43. string>=
  44. string-ci<>
  45. string-ci=
  46. string-ci<
  47. string-ci>
  48. string-ci<=
  49. string-ci>=
  50. string-hash
  51. string-hash-ci
  52. ;; Prefixes & suffixes
  53. string-prefix-length
  54. string-suffix-length
  55. string-prefix-length-ci
  56. string-suffix-length-ci
  57. string-prefix?
  58. string-suffix?
  59. string-prefix-ci?
  60. string-suffix-ci?
  61. ;; Searching
  62. string-index
  63. string-index-right
  64. string-skip
  65. string-skip-right
  66. string-count
  67. string-contains
  68. string-contains-ci
  69. ;; Alphabetic case mapping
  70. string-titlecase
  71. string-upcase
  72. string-downcase
  73. string-titlecase!
  74. string-upcase!
  75. string-downcase!
  76. ;; Reverse & append
  77. string-reverse
  78. string-reverse!
  79. #;string-append
  80. string-concatenate
  81. string-concatenate/shared
  82. string-append/shared
  83. string-concatenate-reverse
  84. string-concatenate-reverse/shared
  85. ;; Fold, unfold & map
  86. string-map
  87. string-map!
  88. string-fold
  89. string-fold-right
  90. string-unfold
  91. string-unfold-right
  92. string-for-each
  93. string-for-each-index
  94. ;; Replicate & rotate
  95. xsubstring
  96. string-xcopy!
  97. ;; Miscellaneous: insertion, parsing
  98. string-replace
  99. string-tokenize
  100. ;; Filtering & deleting
  101. string-filter
  102. string-delete
  103. ;; Low-level procedures
  104. string-parse-start+end
  105. string-parse-final-start+end
  106. let-string-start+end
  107. check-substring-spec
  108. substring-spec-ok?
  109. make-kmp-restart-vector
  110. kmp-step
  111. string-kmp-partial-search
  112. )
  113. (import
  114. (except (scheme base) string-map string-for-each)
  115. (scheme char)
  116. (srfi 8)
  117. (srfi 14)
  118. (srfi 60)
  119. (srfi aux))
  120. (begin
  121. (define-aux-forms check-arg let-optionals* :optional)
  122. (define char-cased? (char-cased?-proc))
  123. (define char-titlecase (char-titlecase-proc)))
  124. (include "13.upstream.scm"))