Next: translate-name-from-foreign, Previous: foreign-funcall-pointer, Up: Functions
translate-camelcase-name is a helper function for
specializations of translate-name-from-foreign and
translate-name-to-foreign. It handles the common case of
converting between foreign camelCase names and lisp
names. upper-initial-p indicates whether the first letter of the
foreign name should be uppercase. special-words is a list of
strings that should be treated atomically in translation. This list is
case-sensitive.
CFFI> (translate-camelcase-name some-xml-function) => "someXmlFunction" CFFI> (translate-camelcase-name some-xml-function :upper-initial-p t) => "SomeXmlFunction" CFFI> (translate-camelcase-name some-xml-function :special-words '("XML")) => "someXMLFunction" CFFI> (translate-camelcase-name "someXMLFunction") => SOME-X-M-L-FUNCTION CFFI> (translate-camelcase-name "someXMLFunction" :special-words '("XML")) => SOME-XML-FUNCTION
translate-name-from-foreign
translate-name-to-foreign
translate-underscore-separated-name