Changeset 3206

Show
Ignore:
Timestamp:
05/30/08 00:24:33 (8 months ago)
Author:
edi
Message:

No reason to be destructive

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/thirdparty/chunga/doc/index.html

    r3186 r3206  
    644644</blockquote> 
    645645 
    646 <p><br>[Function]<br><a class=none name='as-capitalized-string'><b>as-capitalized-string</b> <i>keyword <tt>&amp;key</tt> destructivep</i> =&gt; <i>capitalized-string</i></a> 
     646<p><br>[Function]<br><a class=none name='as-capitalized-string'><b>as-capitalized-string</b> <i>keyword</i> =&gt; <i>capitalized-string</i></a> 
    647647<blockquote><br> 
    648648Kind of the inverse of <a href="#as-keyword"><code>AS-KEYWORD</code></a>.  Has essentially the same effect 
    649649as <a href="http://www.lispworks.com/documentation/HyperSpec/Body/f_stg_up.htm"><code>STRING-CAPITALIZE</code></a> but is optimized for "known" keywords like 
    650 <code>:CONTENT-LENGTH</code> or <code>:GET</code>.  Uses <code>NSTRING-CAPITALIZE</code> if <code><i>destructivep</i></code> is 
    651 true.  
     650<code>:CONTENT-LENGTH</code> or <code>:GET</code>. 
    652651</blockquote> 
    653652 
     
    660659</p> 
    661660<p> 
    662 $Header: /usr/local/cvsrep/chunga/doc/index.html,v 1.32 2008/05/26 08:18:49 edi Exp $ 
     661$Header: /usr/local/cvsrep/chunga/doc/index.html,v 1.33 2008/05/29 22:22:59 edi Exp $ 
    663662<p><a href="http://weitz.de/index.html">BACK TO MY HOMEPAGE</a> 
    664663 
  • trunk/thirdparty/chunga/known-words.lisp

    r3186 r3206  
    11;;; -*- Mode: LISP; Syntax: COMMON-LISP; Package: CHUNGA; Base: 10 -*- 
    2 ;;; $Header: /usr/local/cvsrep/chunga/known-words.lisp,v 1.2 2008/05/24 21:40:54 edi Exp $ 
     2;;; $Header: /usr/local/cvsrep/chunga/known-words.lisp,v 1.3 2008/05/29 22:21:09 edi Exp $ 
    33 
    44;;; Copyright (c) 2006-2008, Dr. Edmund Weitz.  All rights reserved. 
     
    145145      (make-keyword string destructivep))) 
    146146 
    147 (defun as-capitalized-string (keyword &key destructivep
     147(defun as-capitalized-string (keyword
    148148  "Kind of the inverse of AS-KEYWORD.  Has essentially the same effect 
    149149as STRING-CAPITALIZE but is optimized for \"known\" keywords like 
    150 :CONTENT-LENGTH or :GET.  Uses NSTRING-CAPITALIZE if DESTRUCTIVEP is 
    151 true. " 
     150:CONTENT-LENGTH or :GET." 
    152151  (or (gethash keyword +keyword-to-string-hash+) 
    153       (if destructivep 
    154         (nstring-capitalize keyword) 
    155         (string-capitalize keyword)))) 
     152      (string-capitalize keyword)))