Changeset 39856 in project


Ignore:
Timestamp:
04/05/21 23:35:37 (6 weeks ago)
Author:
Kon Lovett
Message:

remove string-utils dep & add utf8, better arg names

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wiki/eggref/5/semantic-version

    r39854 r39856  
    88== Documentation
    99
    10 Semantic-Version handling.
     10A rather busy Semantic Versioning library.
    1111
    1212== Usage
     
    1818=== version-punctuation
    1919
    20 <procedure>(version-punctuation [STR]) -> string</procedure>
     20<parameter>(version-punctuation [STR]) -> string</parameter>
    2121
    2222Returns the string (set) of punctuation characters. The first is always the
    2323default.
    2424
    25 ; STR : {{string}} ; default is "._- +;:,"
     25; STR : {{string}} ; punctuation set, default is "._- +;:,"
    2626
    2727=== version-tail-zero
    2828
    29 <procedure>(version-tail-zero [BOOL]) -> boolean</procedure>
     29<parameter>(version-tail-zero [IGN?]) -> boolean</parameter>
    3030
    3131Returns whether trailing 0's are ignored during comparision.
    3232
     33; IGN? : {{boolean}} ; ignore flag, default is {{#f}}.
     34
    3335=== make-version
     36
     37<procedure>(make-version ELM...) --> version</procedure>
     38
     39Returns a new version with the specified elements, ELM..., and the default
     40punctuation (see {{version-punctuation}}).
     41
     42; ELM : {{(or number string symbol)}} ; version element.
     43
     44'''Note''' that the {{symbol}} printname is used internally.
     45Returns whether trailing 0's are ignored during comparision.
     46
    3447=== check-version
    3548=== error-version
    3649
    37 <procedure>(make-version ELM...) --> version</procedure>
    3850<procedure>(check-version LOC OBJ [NAM]) -> version</procedure>
    3951<procedure>(error-version LOC OBJ [NAM])</procedure>
    4052
    41 Returns a new version with the specified elements, ELM..., and the default
    42 punctuation (see {{version-punctuation}}).
    43 
    44 ; ELM : {{(or number string symbol)}} ; version element.
    45 
    46 '''Note''' that the {{symbol}} printname is used internally.
    47 Returns whether trailing 0's are ignored during comparision.
     53Similar to ''check-errors'' procedures.
    4854
    4955=== version-copy
     
    8187<procedure>(version-puncs VER) --> list</procedure>
    8288
    83 Returns list of separator characters.
     89Returns list of separator characters (punctuation).
    8490
    8591; VER : {{version}} ; version to query.
     
    147153Returns a SRFI 128 {{comparator}} for the {{version}} type.
    148154
     155; {{comparator-hash-function}} : {{version-hash}}
     156; {{comparator-type-test-predicate}} : {{version?}}
     157; {{comparator-equality-predicate comparator}} : {{version=?}}
     158; {{comparator-ordering-predicate comparator}} : {{version<?}}
     159
    149160=== string->version
    150161
     
    154165preserved, and restored by {{version->string}}.
    155166
    156 ; STR : {{string}} ; version string.
     167; STR : {{string}} ; string to convert.
    157168
    158169=== version->string
     
    162173Return the string form of the VER.
    163174
    164 ; VER : {{version}} ; version to hash.
     175; VER : {{version}} ; version to convert.
    165176
    166177=== version-depth+!
    167178
    168 <procedure>(version-depth+! VER CNT PART [PUNC]) -> version</procedure>
    169 
    170 Returns VER with more "depth", as PART, interspersed with PUNC.
     179<procedure>(version-depth+! VER CNT ELM [CHR]) -> version</procedure>
     180
     181Returns VER with more "depth", as ELM, interspersed with CHR.
    171182
    172183; VER : {{version}} ; version to extend.
    173184; CNT : {{integer}} ; element count.
    174 ; PART : {{(or number string symbol)}} ; version element.
    175 ; PUNC : {{char}} ; version punctuation, default is as above.
     185; ELM : {{(or number string symbol)}} ; version element.
     186; CHR : {{char}} ; version punctuation, default is as above.
    176187
    177188=== version-depth-!
     
    187198=== version-depth+
    188199
    189 <procedure>(version-depth+ VER CNT PART [PUNC]) --> version</procedure>
    190 
    191 Returns a copy of VER with more "depth", as PART, interspersed with PUNC.
     200<procedure>(version-depth+ VER CNT ELM [CHR]) --> version</procedure>
     201
     202Returns a copy of VER with more "depth", as ELM, interspersed with CHR.
    192203
    193204; VER : {{version}} ; version to extend.
    194205; CNT : {{integer}} ; element count.
    195 ; PART : {{(or number string symbol)}} ; version element.
    196 ; PUNC : {{char}} ; version punctuation, default is as above.
     206; ELM : {{(or number string symbol)}} ; version element.
     207; CHR : {{char}} ; version punctuation, default is as above.
    197208
    198209=== version-depth-
     
    218229=== version-extend
    219230
    220 <procedure>(version-extend VER  COMP...) --> version</procedure>
     231<procedure>(version-extend VER COMP...) --> version</procedure>
    221232
    222233Returns copy of VER with added "depth", in the form of a new "tail", in
     
    228239=== version-inc!
    229240
    230 <procedure>(version-inc! VER [INDEX AMOUNT]) -> version</procedure>
    231 
    232 Return VER with INDEX element incremented by AMOUNT.
     241<procedure>(version-inc! VER [IDX AMT]) -> version</procedure>
     242
     243Return VER with IDX element incremented by AMT.
    233244
    234245; VER : {{version}} ; version to adjust.
    235 ; INDEX : {{integer}} ; which element to adjust.
    236 ; AMOUNT : {{number}} ; amount to adjust.
     246; IDX : {{integer}} ; which element to adjust.
     247; AMT : {{number}} ; amount to adjust.
    237248
    238249Currently only {{number}} elements may be targets.
     
    240251=== version-dec!
    241252
    242 <procedure>(version-dec! VER [INDEX AMOUNT]) -> version</procedure>
    243 
    244 Return VER with INDEX element decremented by AMOUNT.
     253<procedure>(version-dec! VER [IDX AMT]) -> version</procedure>
     254
     255Return VER with IDX element decremented by AMT.
    245256
    246257; VER : {{version}} ; version to adjust.
    247 ; INDEX : {{integer}} ; which element to adjust.
    248 ; AMOUNT : {{number}} ; amount to adjust.
     258; IDX : {{integer}} ; which element to adjust.
     259; AMT : {{number}} ; amount to adjust.
    249260
    250261Currently only {{number}} elements may be targets.
     
    252263=== version-inc
    253264
    254 <procedure>(version-inc VER [INDEX AMOUNT]) --> version</procedure>
    255 
    256 Return copy of VER with INDEX element incremented by AMOUNT.
     265<procedure>(version-inc VER [IDX AMT]) --> version</procedure>
     266
     267Return copy of VER with IDX element incremented by AMT.
    257268
    258269; VER : {{version}} ; version to adjust.
    259 ; INDEX : {{integer}} ; which element to adjust.
    260 ; AMOUNT : {{number}} ; amount to adjust.
     270; IDX : {{integer}} ; which element to adjust.
     271; AMT : {{number}} ; amount to adjust.
    261272
    262273Currently only {{number}} elements may be targets.
     
    264275=== version-dec
    265276
    266 <procedure>(version-dec VER [INDEX AMOUNT]) --> version</procedure>
    267 
    268 Return copy of VER with INDEX element decremented by AMOUNT.
     277<procedure>(version-dec VER [IDX AMT]) --> version</procedure>
     278
     279Return copy of VER with IDX element decremented by AMT.
    269280
    270281; VER : {{version}} ; version to adjust.
    271 ; INDEX : {{integer}} ; which element to adjust.
    272 ; AMOUNT : {{number}} ; amount to adjust.
     282; IDX : {{integer}} ; which element to adjust.
     283; AMT : {{number}} ; amount to adjust.
    273284
    274285Currently only {{number}} elements may be targets.
     
    311322[[srfi-69]]
    312323[[srfi-128]]
    313 [[string-utils]]
     324[[utf8]]
    314325
    315326[[test]]
Note: See TracChangeset for help on using the changeset viewer.