The symbol-munger Reference Manual

Table of Contents

Next: , Previous: , Up: (dir)   [Contents][Index]

The symbol-munger Reference Manual

This is the symbol-munger Reference Manual, version 0.1, generated automatically by Declt version 2.4 "Will Decker" on Wed Jun 20 12:38:16 2018 GMT+0.


Next: , Previous: , Up: Top   [Contents][Index]

1 Introduction

Symbol Munger

A Common Lisp library to make it easy to change the capitalization and spacing of a "sentence". This is used for converting between space & capitalization rules of various systems.

API

normalize-capitalization-and-spacing

(s &key (capitalize :each-word) (word-separators #\space) word-separators-to-replace stream in-place)

returns a string (new or the one passed in if in-place) unless :stream is provided"

lisp->english

Converts a common lisp symbol (or symbol-name) into an english phrase

:a-symbol-like-this becomes "A Symbol Like This"

english->lisp-symbol & english->keyword

Converts an english phrase into a common lisp symbol (the keyword variant just specifies the keyword package)

"A Symbol Like This" becomes :a-symbol-like-this

Many other similar functions

See The Tests For Working Examples

Authors


Next: , Previous: , Up: Top   [Contents][Index]

2 Systems

The main system appears first, followed by any subsystem dependency.


Previous: , Up: Systems   [Contents][Index]

2.1 symbol-munger

License

BSD

Description

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

Version

0.1

Dependencies
Source

symbol-munger.asd (file)

Component

symbol-munger.lisp (file)


Next: , Previous: , Up: Top   [Contents][Index]

3 Files

Files are sorted by type and then listed depth-first from the systems components trees.


Previous: , Up: Files   [Contents][Index]

3.1 Lisp


Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.1 symbol-munger.asd

Location

symbol-munger.asd

Systems

symbol-munger (system)

Packages

symbol-munger.system


Previous: , Up: Lisp files   [Contents][Index]

3.1.2 symbol-munger/symbol-munger.lisp

Parent

symbol-munger (system)

Location

symbol-munger.lisp

Packages

symbol-munger

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Top   [Contents][Index]

4 Packages

Packages are listed by definition order.


Next: , Previous: , Up: Packages   [Contents][Index]

4.1 symbol-munger.system

Source

symbol-munger.asd

Use List

Previous: , Up: Packages   [Contents][Index]

4.2 symbol-munger

Source

symbol-munger.lisp (file)

Use List
Exported Definitions
Internal Definitions

Next: , Previous: , Up: Top   [Contents][Index]

5 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


Next: , Previous: , Up: Definitions   [Contents][Index]

5.1 Exported definitions


Previous: , Up: Exported definitions   [Contents][Index]

5.1.1 Functions

Function: camel-case->english PHRASE &key STREAM CAPITALIZE
Package

symbol-munger

Source

symbol-munger.lisp (file)

Function: camel-case->keyword PHRASE
Package

symbol-munger

Source

symbol-munger.lisp (file)

Function: camel-case->lisp-name PHRASE &key STREAM CAPITALIZE
Package

symbol-munger

Source

symbol-munger.lisp (file)

Function: camel-case->lisp-symbol PHRASE &optional PACKAGE
Package

symbol-munger

Source

symbol-munger.lisp (file)

Function: camel-case->underscores PHRASE &key STREAM CAPITALIZE
Package

symbol-munger

Source

symbol-munger.lisp (file)

Function: combine-symbols PHRASE &key PACKAGE SEPARATOR
Package

symbol-munger

Source

symbol-munger.lisp (file)

Function: english->camel-case PHRASE &key STREAM CAPITALIZE

Turns an english phrase into a camelCasePhraseLikeThis

Package

symbol-munger

Source

symbol-munger.lisp (file)

Function: english->keyword PHRASE

Turns an english phrase into a common lisp keyword

Package

symbol-munger

Source

symbol-munger.lisp (file)

Function: english->lisp-name PHRASE &key STREAM CAPITALIZE

Turns an english phrase into a string containing a common lisp style symbol-name

Package

symbol-munger

Source

symbol-munger.lisp (file)

Function: english->lisp-symbol PHRASE &optional PACKAGE

Turns an english phrase into a common lisp symbol in the specified package

Package

symbol-munger

Source

symbol-munger.lisp (file)

Function: english->studly-case PHRASE &key STREAM

Turns an english phrase into a CamelCasePhraseLikeThis

Package

symbol-munger

Source

symbol-munger.lisp (file)

Function: english->underscores PHRASE &key STREAM CAPITALIZE

Turns an english phrase into a a_phrase_like_this

Package

symbol-munger

Source

symbol-munger.lisp (file)

Function: lisp->camel-case PHRASE &key STREAM
Package

symbol-munger

Source

symbol-munger.lisp (file)

Function: lisp->english PHRASE &key STREAM CAPITALIZE WORD-SEPARATOR

Converts a common lisp symbol (or symbol-name) into an english phrase

Package

symbol-munger

Source

symbol-munger.lisp (file)

Function: lisp->keyword PHRASE
Package

symbol-munger

Source

symbol-munger.lisp (file)

Function: lisp->studly-caps PHRASE &key STREAM
Package

symbol-munger

Source

symbol-munger.lisp (file)

Function: lisp->underscores PHRASE &key STREAM CAPITALIZE
Package

symbol-munger

Source

symbol-munger.lisp (file)

Function: normalize-capitalization-and-spacing S &key CAPITALIZE 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

Package

symbol-munger

Source

symbol-munger.lisp (file)

Function: qualified-symbol-string SYM
Package

symbol-munger

Source

symbol-munger.lisp (file)

Function: reintern PHRASE &optional PACKAGE
Package

symbol-munger

Source

symbol-munger.lisp (file)

Function: underscores->camel-case PHRASE &key STREAM
Package

symbol-munger

Source

symbol-munger.lisp (file)

Function: underscores->english PHRASE &key STREAM CAPITALIZE
Package

symbol-munger

Source

symbol-munger.lisp (file)

Function: underscores->keyword PHRASE

Converts and underscores name to a common lisp keyword

Package

symbol-munger

Source

symbol-munger.lisp (file)

Function: underscores->lisp-name PHRASE &key STREAM CAPITALIZE
Package

symbol-munger

Source

symbol-munger.lisp (file)

Function: underscores->lisp-symbol PHRASE &optional PACKAGE

Turns a_phrase_with_underscores into a-phrase-with-underscores lisp symbol

Package

symbol-munger

Source

symbol-munger.lisp (file)

Function: underscores->studly-caps PHRASE &key STREAM
Package

symbol-munger

Source

symbol-munger.lisp (file)


Previous: , Up: Definitions   [Contents][Index]

5.2 Internal definitions


Next: , Previous: , Up: Internal definitions   [Contents][Index]

5.2.1 Macros

Macro: ensure-flat-list! PLACE
Package

symbol-munger

Source

symbol-munger.lisp (file)

Macro: ensure-list! PLACE
Package

symbol-munger

Source

symbol-munger.lisp (file)


Previous: , Up: Internal definitions   [Contents][Index]

5.2.2 Generic functions

Generic Function: %coerce-to-string S

This method can be specialized to help turn objects into strings so they can be combined and normalized correctly

Package

symbol-munger

Source

symbol-munger.lisp (file)

Methods
Method: %coerce-to-string S

Previous: , Up: Top   [Contents][Index]

Appendix A Indexes


Next: , Previous: , Up: Indexes   [Contents][Index]

A.1 Concepts

Jump to:   F   L   S  
Index Entry  Section

F
File, Lisp, symbol-munger.asd: The symbol-munger<dot>asd file
File, Lisp, symbol-munger/symbol-munger.lisp: The symbol-munger/symbol-munger<dot>lisp file

L
Lisp File, symbol-munger.asd: The symbol-munger<dot>asd file
Lisp File, symbol-munger/symbol-munger.lisp: The symbol-munger/symbol-munger<dot>lisp file

S
symbol-munger.asd: The symbol-munger<dot>asd file
symbol-munger/symbol-munger.lisp: The symbol-munger/symbol-munger<dot>lisp file

Jump to:   F   L   S  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.2 Functions

Jump to:   %  
C   E   F   G   L   M   N   Q   R   U  
Index Entry  Section

%
%coerce-to-string: Internal generic functions
%coerce-to-string: Internal generic functions

C
camel-case->english: Exported functions
camel-case->keyword: Exported functions
camel-case->lisp-name: Exported functions
camel-case->lisp-symbol: Exported functions
camel-case->underscores: Exported functions
combine-symbols: Exported functions

E
english->camel-case: Exported functions
english->keyword: Exported functions
english->lisp-name: Exported functions
english->lisp-symbol: Exported functions
english->studly-case: Exported functions
english->underscores: Exported functions
ensure-flat-list!: Internal macros
ensure-list!: Internal macros

F
Function, camel-case->english: Exported functions
Function, camel-case->keyword: Exported functions
Function, camel-case->lisp-name: Exported functions
Function, camel-case->lisp-symbol: Exported functions
Function, camel-case->underscores: Exported functions
Function, combine-symbols: Exported functions
Function, english->camel-case: Exported functions
Function, english->keyword: Exported functions
Function, english->lisp-name: Exported functions
Function, english->lisp-symbol: Exported functions
Function, english->studly-case: Exported functions
Function, english->underscores: Exported functions
Function, lisp->camel-case: Exported functions
Function, lisp->english: Exported functions
Function, lisp->keyword: Exported functions
Function, lisp->studly-caps: Exported functions
Function, lisp->underscores: Exported functions
Function, normalize-capitalization-and-spacing: Exported functions
Function, qualified-symbol-string: Exported functions
Function, reintern: Exported functions
Function, underscores->camel-case: Exported functions
Function, underscores->english: Exported functions
Function, underscores->keyword: Exported functions
Function, underscores->lisp-name: Exported functions
Function, underscores->lisp-symbol: Exported functions
Function, underscores->studly-caps: Exported functions

G
Generic Function, %coerce-to-string: Internal generic functions

L
lisp->camel-case: Exported functions
lisp->english: Exported functions
lisp->keyword: Exported functions
lisp->studly-caps: Exported functions
lisp->underscores: Exported functions

M
Macro, ensure-flat-list!: Internal macros
Macro, ensure-list!: Internal macros
Method, %coerce-to-string: Internal generic functions

N
normalize-capitalization-and-spacing: Exported functions

Q
qualified-symbol-string: Exported functions

R
reintern: Exported functions

U
underscores->camel-case: Exported functions
underscores->english: Exported functions
underscores->keyword: Exported functions
underscores->lisp-name: Exported functions
underscores->lisp-symbol: Exported functions
underscores->studly-caps: Exported functions

Jump to:   %  
C   E   F   G   L   M   N   Q   R   U  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.3 Variables


Previous: , Up: Indexes   [Contents][Index]

A.4 Data types

Jump to:   P   S  
Index Entry  Section

P
Package, symbol-munger: The symbol-munger package
Package, symbol-munger.system: The symbol-munger<dot>system package

S
symbol-munger: The symbol-munger system
symbol-munger: The symbol-munger package
symbol-munger.system: The symbol-munger<dot>system package
System, symbol-munger: The symbol-munger system

Jump to:   P   S