Continuing Marc’s exploration of Lisp, today we present a Scheme function that might be marginally useful:
(define (camel-case-from-underscored underscored-name) (regexp-substitute/global #f "_" (string-capitalize underscored-name) 'pre 'post))
Here’s it in action – try to contain your excitement:
$ guile guile> (load "string_stuff.scm") guile> (camel-case-from-underscored "super_cool_button") "SuperCoolButton"
Now, for a real challenge: make a function that will convert back and forth between the two formats. 😉