Changeset 39546 in project


Ignore:
Timestamp:
01/29/21 03:05:31 (4 weeks ago)
Author:
Kon Lovett
Message:

rel 2.4.0

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wiki/eggref/5/string-utils

    r39052 r39546  
    206206</enscript>
    207207
     208==== string-trim-whitespace-both
     209
     210<procedure>(string-trim-whitespace-both S) -> string</procedure>
     211
     212Returns the {{string}} {{S}} with whitespace trimmed.
     213
     214==== list-as-string
     215
     216<procedure>(list-as-string LS) -> string</procedure>
     217
     218Returns the {{list}} {{LS}} written to a {{string}}.
     219
     220==== number->padded-string
     221
     222<procedure>(number->padded-string N WIDTH [PADCHAR [BASE]]) -> string</procedure>
     223
     224; N : {{number}} ; source
     225; WIDTH : {{fixnum}} ; field width
     226; PADCHAR : {{char}} ; padding character
     227; BASE : {{fixnum}} ; number conversion base
     228
    208229==== string-fixed-length
    209230
    210 <procedure>(string-fixed-length S N [pad-char: #\space] [trailing: "..."]) --> string</procedure>
    211 
    212 Returns the string {{S}} with the {{string-length}} fixed to {{N}}.
     231<procedure>(string-fixed-length S N [pad-char: #\space] [trailing: "..."]) -> string</procedure>
     232
     233Returns the {{string}} {{S}} with the {{string-length}} fixed to {{N}}.
    213234
    214235A shorter string is padded. A longer string is truncated, & suffixed with the
     
    217238==== string-longest-common-prefix
    218239
    219 <procedure>(string-longest-common-prefix CANDIDATE OTHERS) --> (or boolean string)</procedure>
     240<procedure>(string-longest-common-prefix STRINGS) -> string</procedure>
     241
     242Returns the longest comment prefix of {{STRINGS}}.
     243
     244; STRINGS : {{(list-of string)}}
     245
     246==== string-longest-common-suffix
     247
     248<procedure>(string-longest-common-suffix STRINGS) -> string</procedure>
     249
     250Returns the longest comment suffix of {{STRINGS}}.
     251
     252; STRINGS : {{(list-of string)}}
     253
     254==== string-longest-prefix
     255
     256<procedure>(string-longest-prefix CANDIDATE OTHERS) -> (or boolean string)</procedure>
    220257
    221258Returns the member with the longest comment prefix of {{CANDIDATE}} from
     259{{OTHERS}}, or {{#f}}.
     260
     261; CANDIDATE : {{string}}
     262; OTHERS : {{(list-of string)}}
     263
     264==== string-longest-suffix
     265
     266<procedure>(string-longest-suffix CANDIDATE OTHERS) -> (or boolean string)</procedure>
     267
     268Returns the member with the longest comment suffix of {{CANDIDATE}} from
    222269{{OTHERS}}, or {{#f}}.
    223270
     
    315362== Version history
    316363
     364; 2.4.0 : Add {{string-longest-common-prefix/suffix}}, {{string-longest-prefix/suffix}}, {{number->padded-string}}, {{list-as-string}}, {{string-trim-whitespace-both}}.
    317365; 2.3.2 : Deprecate {{unicode-char->string}}, fixes for {{memoized-string}} & {{string-utils}} modules, {{ascii-codepoint?}} & {{unicode-surrogate?}} are not predicates.
    318366; 2.3.1 : Minor optimization.
     
    321369; 2.1.0 : Add {{utf8-string-interpolation}}.
    322370; 2.0.0 : C5 release.
    323 ; 1.6.0 : Add {{string-utils-extensions}}.
    324 ; 1.5.6 : Add types.
    325 ; 1.5.5 : .
    326 ; 1.5.4 : .
    327 ; 1.5.3 : {{memorize-string}} -> {{global-string}}.
    328 ; 1.5.2 : Fix {{string+}} & {{memorize-string}}.
    329 ; 1.5.1 : Fix {{string+}} unicode support.
    330 ; 1.5.0 : Deprecate {{make-string*}} for {{make-string+}}, add {{memorize-string}} & {{string+}}.
    331 ; 1.4.0 : Add string-interpolation modules.
    332 ; 1.3.1 : Fix {{hex_to_str}}, {{hex_to_blob}}.
    333 ; 1.3.0 : Add {{hex->string}}, {{hex_to_str}}, {{hex_to_blob}}.
    334 ; 1.2.5 : Remove [[lookup-table]].
    335 ; 1.2.2 : Unicode string construction a little faster. Removed {{blob->hex}}.
    336 ; 1.2.1 : Added {{blob->hex}}.
    337 ; 1.2.0 : Added "generic" bytes to hexadecimal string.
    338 ; 1.1.0 : Split into separate modules. Added some UTF-8 support.
    339 ; 1.0.0 : Hello
    340371
    341372
    342373== License
    343374
    344 Copyright (C) 2010-2020 Kon Lovett.  All rights reserved.
     375Copyright (C) 2010-2021 Kon Lovett.  All rights reserved.
    345376
    346377Permission is hereby granted, free of charge, to any person obtaining a
Note: See TracChangeset for help on using the changeset viewer.