Changeset 35186 in project


Ignore:
Timestamp:
02/23/18 19:18:22 (4 months ago)
Author:
kon
Message:

rel 1.6.0

File:
1 edited

Legend:

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

    r35145 r35186  
    1818==== make-string+
    1919
    20 <procedure>(make-string+ COUNT [FILL]) => string</procedure>
     20<procedure>(make-string+ COUNT [FILL]) -> string</procedure>
    2121
    2222A ''tabling'' {{make-string}}.
     
    2727==== string+
    2828
    29 <procedure>(string+ [CHAR...]) => string</procedure>
     29<procedure>(string+ [CHAR...]) -> string</procedure>
    3030
    3131A ''tabling'' {{string}}.
     
    3636==== global-string
    3737
    38 <procedure>(global-string STR) => string</procedure>
     38<procedure>(global-string STR) -> string</procedure>
    3939
    4040Share common string space.
     
    4242==== make-string* (DEPRECATED)
    4343
    44 <procedure>(make-string* COUNT [FILL]) => string</procedure>
     44<procedure>(make-string* COUNT [FILL]) -> string</procedure>
    4545
    4646=== String Hexadecimal
     
    5454==== string->hex
    5555
    56 <procedure>(string->hex STRING [START [END]]) => string</procedure>
     56<procedure>(string->hex STRING [START [END]]) -> string</procedure>
    5757
    5858Returns a hexadecimal represenation of {{STRING}}. {{START}} and {{END}} are
     
    6363==== hex->string
    6464
    65 <procedure>(hex->string STRING [START [END]]) => string</procedure>
     65<procedure>(hex->string STRING [START [END]]) -> string</procedure>
    6666
    6767Returns the binary representation of a hexadecimal{{STRING}}. {{START}} and
     
    8282==== ascii-codepoint?
    8383
    84 <procedure>(ascii-codepoint? CHAR) => boolean</procedure>
     84<procedure>(ascii-codepoint? CHAR) -> boolean</procedure>
    8585
    8686==== unicode-char->string
    8787
    88 <procedure>(unicode-char->string CHAR) => string</procedure>
     88<procedure>(unicode-char->string CHAR) -> string</procedure>
    8989
    9090Returns a string formed from Unicode codepoint {{CHAR}}.
     
    9797==== unicode-string
    9898
    99 <procedure>(unicode-string [CHAR...]) => string</procedure>
     99<procedure>(unicode-string [CHAR...]) -> string</procedure>
    100100
    101101Returns a string formed from Unicode codepoints {{CHAR...}}
     
    108108==== *unicode-string
    109109
    110 <procedure>(*unicode-string CHARS) => string</procedure>
     110<procedure>(*unicode-string CHARS) -> string</procedure>
    111111
    112112Returns a string formed from Unicode codepoints {{CHARS}}, a {{(list-of
     
    115115==== unicode-make-string
    116116
    117 <procedure>(unicode-make-string COUNT [FILL]) => string</procedure>
     117<procedure>(unicode-make-string COUNT [FILL]) -> string</procedure>
    118118
    119119Returns a string formed from {{COUNT}} occurrences of the Unicode codepoint
     
    127127==== unicode-surrogate?
    128128
    129 <procedure>(unicode-surrogate? NUM) => boolean</procedure>
     129<procedure>(unicode-surrogate? NUM) -> boolean</procedure>
    130130
    131131==== unicode-surrogates->codepoint
    132132
    133 <procedure>(unicode-surrogates->codepoint HIGH LOW) => (or boolean fixnum)</procedure>
     133<procedure>(unicode-surrogates->codepoint HIGH LOW) -> (or boolean fixnum)</procedure>
    134134
    135135Returns the codepoint for the valid surrogate pair {{HIGH}} and {{LOW}}.
    136136Otherwise returns {{#f}}.
    137137
     138=== String Extensions
     139
     140Some multi-string replacements.
     141
     142== Usage
     143
     144<enscript language=scheme>
     145(require-extension string-utils-extensions)
     146</enscript>
     147
     148==== string-copy-over!
     149
     150<procedure>(string-copy-over! FROM TO [START [END]]) -> string</procedure>
     151
     152Copies a substring of {{FROM}}, determined by {{START}} & {{END}}. Returns the
     153modified {{TO}}.
     154
     155: {{FROM}} ; {{string}} ;
     156: {{TO}} ; {{string}} ;
     157: {{START}} ; {{fixnum}} ; default {{0}}
     158: {{END}} ; {{fixnum}} ; default {{string-length}}
     159
     160==== string-count*
     161
     162<procedure>(string-count* PRED? [STR ...]) -> fixnum</procedure>
     163
     164: {{STR}} ; {{string}} ;
     165: {{PRED?}} ; {{(#!rest char --> boolean)}} ;
     166
     167==== string-any*
     168
     169<procedure>(string-any* PRED? [STR ...]) -> (or boolean char)</procedure>
     170
     171: {{STR}} ; {{string}} ;
     172: {{PRED?}} ; {{(#!rest char --> boolean)}} ;
     173
     174==== string-every*
     175
     176<procedure>(string-every* PRED? [STR ...]) -> (or boolean char)</procedure>
     177
     178: {{STR}} ; {{string}} ;
     179: {{PRED?}} ; {{(#!rest char --> boolean)}} ;
     180
    138181=== String Utilities
    139182
     
    230273==== string-interpolate
    231274
    232 <procedure>(string-interpolate STR [eval-tag: EVAL-TAG] [eval-env: EVAL-ENV]) => string</procedure>
     275<procedure>(string-interpolate STR [eval-tag: EVAL-TAG] [eval-env: EVAL-ENV]) -> string</procedure>
    233276
    234277Performs substitution of embedded Scheme expressions, evaluated in the
     
    260303
    261304<enscript language=scheme>
    262 (require-extension utf8-string-interpolation)
    263 (require-extension string-interpolation-syntax)
     305(use string-interpolation-syntax utf8-string-interpolation)
    264306
    265307(set-sharp-string-interpolation-syntax string-interpolate)
    266308;#"foo #(+ 1 2)bar #{(and 1 2)} baz"
     309;=> "foo 3bar 2 baz"
    267310</enscript>
    268311
     
    285328== Version history
    286329
     330; 1.6.0 : Add {{string-utils-extensions}}.
    287331; 1.5.6 : Add types.
    288332; 1.5.5 :
Note: See TracChangeset for help on using the changeset viewer.