| 1 | ;;; srfi-13.scm --- String Library |
| 2 | |
| 3 | ;; Copyright (C) 2001, 2002, 2003, 2004, 2006 Free Software Foundation, Inc. |
| 4 | ;; |
| 5 | ;; This library is free software; you can redistribute it and/or |
| 6 | ;; modify it under the terms of the GNU Lesser General Public |
| 7 | ;; License as published by the Free Software Foundation; either |
| 8 | ;; version 2.1 of the License, or (at your option) any later version. |
| 9 | ;; |
| 10 | ;; This library is distributed in the hope that it will be useful, |
| 11 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 13 | ;; Lesser General Public License for more details. |
| 14 | ;; |
| 15 | ;; You should have received a copy of the GNU Lesser General Public |
| 16 | ;; License along with this library; if not, write to the Free Software |
| 17 | ;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
| 18 | |
| 19 | ;;; Commentary: |
| 20 | |
| 21 | ;; This module is fully documented in the Guile Reference Manual. |
| 22 | ;; |
| 23 | ;; All procedures are in the core and are simply reexported here. |
| 24 | |
| 25 | ;;; Code: |
| 26 | |
| 27 | (define-module (srfi srfi-13)) |
| 28 | |
| 29 | (re-export |
| 30 | ;;; Predicates |
| 31 | string? |
| 32 | string-null? |
| 33 | string-any |
| 34 | string-every |
| 35 | |
| 36 | ;;; Constructors |
| 37 | make-string |
| 38 | string |
| 39 | string-tabulate |
| 40 | |
| 41 | ;;; List/string conversion |
| 42 | string->list |
| 43 | list->string |
| 44 | reverse-list->string |
| 45 | string-join |
| 46 | |
| 47 | ;;; Selection |
| 48 | string-length |
| 49 | string-ref |
| 50 | string-copy |
| 51 | substring/shared |
| 52 | string-copy! |
| 53 | string-take string-take-right |
| 54 | string-drop string-drop-right |
| 55 | string-pad string-pad-right |
| 56 | string-trim string-trim-right |
| 57 | string-trim-both |
| 58 | |
| 59 | ;;; Modification |
| 60 | string-set! |
| 61 | string-fill! |
| 62 | |
| 63 | ;;; Comparison |
| 64 | string-compare |
| 65 | string-compare-ci |
| 66 | string= string<> |
| 67 | string< string> |
| 68 | string<= string>= |
| 69 | string-ci= string-ci<> |
| 70 | string-ci< string-ci> |
| 71 | string-ci<= string-ci>= |
| 72 | string-hash string-hash-ci |
| 73 | |
| 74 | ;;; Prefixes/Suffixes |
| 75 | string-prefix-length |
| 76 | string-prefix-length-ci |
| 77 | string-suffix-length |
| 78 | string-suffix-length-ci |
| 79 | string-prefix? |
| 80 | string-prefix-ci? |
| 81 | string-suffix? |
| 82 | string-suffix-ci? |
| 83 | |
| 84 | ;;; Searching |
| 85 | string-index |
| 86 | string-index-right |
| 87 | string-skip string-skip-right |
| 88 | string-count |
| 89 | string-contains string-contains-ci |
| 90 | |
| 91 | ;;; Alphabetic case mapping |
| 92 | string-upcase |
| 93 | string-upcase! |
| 94 | string-downcase |
| 95 | string-downcase! |
| 96 | string-titlecase |
| 97 | string-titlecase! |
| 98 | |
| 99 | ;;; Reverse/Append |
| 100 | string-reverse |
| 101 | string-reverse! |
| 102 | string-append |
| 103 | string-append/shared |
| 104 | string-concatenate |
| 105 | string-concatenate-reverse |
| 106 | string-concatenate/shared |
| 107 | string-concatenate-reverse/shared |
| 108 | |
| 109 | ;;; Fold/Unfold/Map |
| 110 | string-map string-map! |
| 111 | string-fold |
| 112 | string-fold-right |
| 113 | string-unfold |
| 114 | string-unfold-right |
| 115 | string-for-each |
| 116 | string-for-each-index |
| 117 | |
| 118 | ;;; Replicate/Rotate |
| 119 | xsubstring |
| 120 | string-xcopy! |
| 121 | |
| 122 | ;;; Miscellaneous |
| 123 | string-replace |
| 124 | string-tokenize |
| 125 | |
| 126 | ;;; Filtering/Deleting |
| 127 | string-filter |
| 128 | string-delete) |
| 129 | |
| 130 | (cond-expand-provide (current-module) '(srfi-13)) |
| 131 | |
| 132 | ;;; srfi-13.scm ends here |