chickadee » scheme » symbol->string

symbol->string symbolprocedure

Returns the name of symbol as a string. If the symbol was part of an object returned as the value of a literal expression (see "literal expressions") or by a call to the read procedure, and its name contains alphabetic characters, then the string returned will contain characters in the implementation's preferred standard case -- some implementations will prefer upper case, others lower case. If the symbol was returned by string->symbol, the case of characters in the string returned will be the same as the case in the string that was passed to string->symbol. It is an error to apply mutation procedures like string-set! to strings returned by this procedure.

The following examples assume that the implementation's standard case is lower case:

(symbol->string 'flying-fish)     
                                          ===>  "flying-fish"
(symbol->string 'Martin)                  ===>  "martin"
(symbol->string
   (string->symbol "Malvina"))     
                                          ===>  "Malvina"