Package: cffi
Generic Function translate-camelcase-name
Lambda Listtranslate-camelcase-name (name &key upper-initial-p special-words) ArgumentsReturn ValueIf name is a symbol, this is a string, and vice versa. Details 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. ExamplesCFFI> (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 | See also |