string-inflection 0

underscore -> UPCASE -> CamelCase conversion of names

#+OPTIONS: toc:nil num:nil author:nil creator:nil \n:nil |:t #+OPTIONS: @:t ::t ^:t -:t f:t *:t <:t

  • underscore -> UPCASE -> CamelCase conversion of names

** Configuration Example

#+BEGIN_SRC elisp (require ‘string-inflection) (global-unset-key (kbd “C-q”)) (global-set-key (kbd “C-q C-u”) ‘string-inflection-cycle) #+END_SRC

C-q C-u is the key bindings similar to Vz Editor.

We will change as follows each type C-q C-u Place the cursor in the emacs_lisp.

: emacs_lisp => EMACS_LISP => EmacsLisp => emacs_lisp

In the case of string-inflection-java-style-cycle

: emacsLisp => EMACS_LISP => EmacsLisp => emacsLisp

In the case of string-inflection-all-cycle

: emacs_lisp => EMACS_LISP => EmacsLisp => emacsLisp => emacs_lisp

The string-inflection-all-cycle, conversion often. However, conversion occurs even when there is no need to lower-camelcase. Therefore so difficult to use, is not recommended

** Function that can be used alone

#+BEGIN_SRC elisp (string-inflection-underscore-function “EmacsLisp”) ; => “emacs_lisp” (string-inflection-camelcase-function “emacs_lisp”) ; => “EmacsLisp” (string-inflection-lower-camelcase-function “emacs_lisp”) ; => “emacsLisp” (string-inflection-upcase-function “emacs_lisp”) ; => “EMACS_LISP” (string-inflection-camelcase-p “EmacsLisp”) ; => t (string-inflection-camelcase-p “emacs_lisp”) ; => nil #+END_SRC

Top Contributors

akicho8 knu wjlroe purcell Wqer555 yasuyk vindarel