Move substring? to be near its relatives.
authorChris Hanson <org/chris-hanson/cph>
Sat, 4 Mar 2017 08:32:32 +0000 (00:32 -0800)
committerChris Hanson <org/chris-hanson/cph>
Sat, 4 Mar 2017 08:32:32 +0000 (00:32 -0800)
src/runtime/ustring.scm

index a71dadc864ad1873d57e78453e027e53af3a67ed..85e3aba56e310f14caa21bf89c8e53c410dba7dd 100644 (file)
@@ -962,6 +962,11 @@ USA.
   (string-matcher 'string-search-all
                  %dumb-string-search-all))
 
+(define (substring? pattern text)
+  (and (or (fix:= 0 (string-length pattern))
+          (string-search-forward pattern text))
+       #t))
+
 (define (%dumb-string-search-forward pattern pend text tstart tlast)
   (let find-match ((tindex tstart))
     (and (fix:<= tindex tlast)
@@ -1467,11 +1472,6 @@ USA.
 
 (define substring-find-previous-char-in-set
   (substring-find-maker string-find-previous-char-in-set))
-
-(define (substring? pattern text)
-  (and (or (fix:= 0 (string-length pattern))
-          (string-search-forward pattern text))
-       #t))
 \f
 (define (string-move! string1 string2 start2)
   (string-copy! string2 start2 string1))