Changeset 39836 in project


Ignore:
Timestamp:
04/05/21 01:12:33 (2 weeks ago)
Author:
Kon Lovett
Message:

fix example in somment, reflow

File:
1 edited

Legend:

Unmodified
Added
Removed
  • release/5/string-utils/trunk/string-utils.scm

    r39830 r39836  
    1919
    2020(import scheme
    21         (only utf8 string-length make-string substring) ;string-append
     21        utf8
    2222        (chicken base)
    2323        (chicken type)
     
    3434;;
    3535
     36(: string-unzip (string string -> (list-of string) (list-of string)))
     37(: string-zip   ((list-of string) (list-of string) -> string))
     38
     39(: string-trim-whitespace-both  (string -> string))
     40(: list-as-string               (list -> string))
     41(: number->padded-string        (number fixnum #!optional char fixnum -> string))
     42(: string-fixed-length          (string fixnum #!rest -> string))
     43
     44(: *string-longest-common-prefix  ((list-of (list-of char)) -> (list-of char)))
     45(: string-longest-common-prefix   ((list-of string) -> string))
     46(: string-longest-common-suffix   ((list-of string) -> string))
     47
     48(: *string-longest-prefix (string (list-of string) procedure -> *))
     49(: string-longest-prefix  (string (list-of string) -> (or boolean string)))
     50(: string-longest-suffix  (string (list-of string) -> (or boolean string)))
     51
     52;;
     53
    3654;(binary-predicate-reduce p? ls)
    3755;=> (and (p? (1st ls) (2nd ls)) (p? (2nd ls) (3rd ls)) ...)
     
    4765;;
    4866
    49 (: string-unzip (string string -> (list-of string) (list-of string)))
    50 (: string-zip ((list-of string) (list-of string) -> string))
    51 
    52 (: string-trim-whitespace-both (string -> string))
    53 (: list-as-string (list -> string))
    54 (: number->padded-string (number fixnum #!optional char fixnum -> string))
    55 (: string-fixed-length (string fixnum #!rest -> string))
    56 
    57 (: *string-longest-common-prefix ((list-of (list-of char)) -> (list-of char)))
    58 (: string-longest-common-prefix ((list-of string) -> string))
    59 (: string-longest-common-suffix ((list-of string) -> string))
    60 
    61 (: *string-longest-prefix (string (list-of string) procedure -> *))
    62 (: string-longest-prefix (string (list-of string) -> (or boolean string)))
    63 (: string-longest-suffix (string (list-of string) -> (or boolean string)))
    64 
    65 ;;
    66 
    6767;NOTE irregex-split doesn't preserve "missing" so punct vs parts is ambiguous
    6868
    6969;"..." => parts punct
    70 ;"a.b.c" => ("." ".") + ("a" "b" "c")
     70;"a.b,c" => ("a" "b" "c") ("." ",")
    7171(define (string-unzip str punct-str)
    7272  (let (
Note: See TracChangeset for help on using the changeset viewer.