symbol-munger

API Reference

symbol-munger

Functions to convert between the spacing and capitalization conventions of various environments

SYMBOL-MUNGER

  • Function QUALIFIED-SYMBOL-STRING (sym)
  • Function NORMALIZE-CAPITALIZATION-AND-SPACING (s &key (capitalize :each-word) (word-separators #\ ) word-separators-to-replace stream in-place)
    Will recapitalize a string and replace word-separators with a standard one (in-place if desired and possible) If s is a lisp tree, then each part will be %coerce-to-string'ed and treated as a separate part of the phrase being normalized Will write to a stream if given otherwise it. Defaults to capitalizing each word but can be any of {:each-word :first-word T (:all is an alias for T) nil :but-first-word (likeJavaScript) } word-separators are used to distinguish new words for the purposes of capitalization The first of these will be used to replace word-separators-to-replace (auto flattened) word-separators-to-replace helps normalize word separators so that spaces or underscores become the appropriate word-separator. If this eql :capitals it assumes capital letters indicate a new word separation (auto flattened) returns a string (new or the one passed in if in-place) unless :stream is provided
  • Function ENGLISH->LISP-NAME (phrase &key stream capitalize)
    Turns an english phrase into a string containing a common lisp style symbol-name
  • Function ENGLISH->LISP-SYMBOL (phrase &optional (package *package*))
    Turns an english phrase into a common lisp symbol in the specified package
  • Function ENGLISH->KEYWORD (phrase)
    Turns an english phrase into a common lisp keyword
  • Function ENGLISH->CAMEL-CASE (phrase &key stream (capitalize :but-first-word))
    Turns an english phrase into a camelCasePhraseLikeThis
  • Function ENGLISH->STUDLY-CASE (phrase &key stream)
    Turns an english phrase into a CamelCasePhraseLikeThis
  • Function ENGLISH->UNDERSCORES (phrase &key stream capitalize)
    Turns an english phrase into a a_phrase_like_this
  • Function LISP->ENGLISH (phrase &key stream (capitalize :each-word) (word-separator #\ ))
    Converts a common lisp symbol (or symbol-name) into an english phrase
  • Function LISP->KEYWORD (phrase)
  • Function REINTERN (phrase &optional (package *package*))
  • Function COMBINE-SYMBOLS (phrase &key (package *package*) (separator #\-))
  • Function LISP->CAMEL-CASE (phrase &key stream)
  • Function LISP->STUDLY-CAPS (phrase &key stream)
  • Function LISP->UNDERSCORES (phrase &key stream capitalize)
  • Function CAMEL-CASE->ENGLISH (phrase &key stream (capitalize :each-word))
  • Function CAMEL-CASE->LISP-NAME (phrase &key stream (capitalize nil))
  • Function CAMEL-CASE->LISP-SYMBOL (phrase &optional (package *package*))
  • Function CAMEL-CASE->KEYWORD (phrase)
  • Function CAMEL-CASE->UNDERSCORES (phrase &key stream capitalize)
  • Function UNDERSCORES->ENGLISH (phrase &key stream (capitalize :each-word))
  • Function UNDERSCORES->LISP-NAME (phrase &key stream (capitalize nil))
  • Function UNDERSCORES->LISP-SYMBOL (phrase &optional (package *package*))
    Turns a_phrase_with_underscores into a-phrase-with-underscores lisp symbol
  • Function UNDERSCORES->KEYWORD (phrase)
    Converts and underscores name to a common lisp keyword
  • Function UNDERSCORES->CAMEL-CASE (phrase &key stream)
  • Function UNDERSCORES->STUDLY-CAPS (phrase &key stream)