Eliminate camel-case procedures.
authorChris Hanson <org/chris-hanson/cph>
Wed, 22 Feb 2017 09:20:41 +0000 (01:20 -0800)
committerChris Hanson <org/chris-hanson/cph>
Wed, 22 Feb 2017 09:20:41 +0000 (01:20 -0800)
src/edwin/edwin.pkg
src/edwin/string.scm
src/runtime/runtime.pkg
src/runtime/string.scm

index 8c3c638557f64c195b36c80640bc2d9dee34df14..f1b6090c2dd00b53e5ec3d2402a97c00d665ac15 100644 (file)
@@ -154,7 +154,6 @@ USA.
          (vector-8b? string?)
          ascii-string-copy
          burst-string
-         camel-case-string->lisp
          char->string
          decorated-string-append
          error:not-string
@@ -163,7 +162,6 @@ USA.
          guarantee-substring
          guarantee-substring-end-index
          guarantee-substring-start-index
-         lisp-string->camel-case
          list->string
          make-string
          make-vector-8b
index 39d3bc3cf0ba9f174105ac4739afd36507f7b7e1..7b52e5fda20f8848c114e0028b66c9b0e793f1fe 100644 (file)
@@ -756,44 +756,6 @@ USA.
          (%substring-upcase! string index (fix:+ index 1))
          (%substring-downcase! string (fix:+ index 1) end)))))
 \f
-;;;; CamelCase support
-
-(define (camel-case-string->lisp string)
-  (call-with-input-string string
-    (lambda (input)
-      (call-with-output-string
-       (lambda (output)
-         (let loop ((prev #f))
-           (let ((c (read-char input)))
-             (if (not (eof-object? c))
-                 (begin
-                   (if (and prev (char-upper-case? c))
-                       (write-char #\- output))
-                   (write-char (char-downcase c) output)
-                   (loop c))))))))))
-
-(define (lisp-string->camel-case string #!optional upcase-initial?)
-  (call-with-input-string string
-    (lambda (input)
-      (call-with-output-string
-       (lambda (output)
-         (let loop
-             ((upcase?
-               (if (default-object? upcase-initial?)
-                   #t
-                   upcase-initial?)))
-           (let ((c (read-char input)))
-             (if (not (eof-object? c))
-                 (if (char-alphabetic? c)
-                     (begin
-                       (write-char (if upcase? (char-upcase c) c) output)
-                       (loop #f))
-                     (begin
-                       (if (or (char-numeric? c)
-                               (eq? c #\_))
-                           (write-char c output))
-                       (loop #t)))))))))))
-\f
 ;;;; Replace
 
 (define (string-replace string char1 char2)
index ac633cfc228d79c1abf123dcaeee8c75aae757c4..cfecd61954aebef7159d614b830ca14dd40e0e20 100644 (file)
@@ -1033,11 +1033,9 @@ USA.
          vector-8b-ref
          vector-8b-set!)
   (export ()
-         camel-case-string->lisp
          guarantee-substring
          guarantee-substring-end-index
          guarantee-substring-start-index
-         lisp-string->camel-case
          reverse-string
          reverse-substring
          string-compare
index 20da67acfdace646324bcf3fe3720f234ba2faf5..6768eb58081e6b38653909539bef56cf1c10bbaa 100644 (file)
@@ -89,44 +89,6 @@ USA.
        (string-set! result j (string-ref string i)))
       result)))
 \f
-;;;; CamelCase support
-
-(define (camel-case-string->lisp string)
-  (call-with-input-string string
-    (lambda (input)
-      (call-with-output-string
-       (lambda (output)
-         (let loop ((prev #f))
-           (let ((c (read-char input)))
-             (if (not (eof-object? c))
-                 (begin
-                   (if (and prev (char-upper-case? c))
-                       (write-char #\- output))
-                   (write-char (char-downcase c) output)
-                   (loop c))))))))))
-
-(define (lisp-string->camel-case string #!optional upcase-initial?)
-  (call-with-input-string string
-    (lambda (input)
-      (call-with-output-string
-       (lambda (output)
-         (let loop
-             ((upcase?
-               (if (default-object? upcase-initial?)
-                   #t
-                   upcase-initial?)))
-           (let ((c (read-char input)))
-             (if (not (eof-object? c))
-                 (if (char-alphabetic? c)
-                     (begin
-                       (write-char (if upcase? (char-upcase c) c) output)
-                       (loop #f))
-                     (begin
-                       (if (or (char-numeric? c)
-                               (eq? c #\_))
-                           (write-char c output))
-                       (loop #t)))))))))))
-\f
 ;;;; Replace
 
 (define (string-replace string char1 char2)