All Projects → akicho8 → String Inflection

akicho8 / String Inflection

underscore -> UPCASE -> CamelCase conversion of names

Projects that are alternatives of or similar to String Inflection

Underscore.string
String manipulation helpers for javascript
Stars: ✭ 3,355 (+2036.94%)
Mutual labels:  utility, string
Org Wiki
Wiki for Emacs org-mode built on top of Emacs org-mode.
Stars: ✭ 319 (+103.18%)
Mutual labels:  utility, emacs
Util
A collection of useful utility functions
Stars: ✭ 201 (+28.03%)
Mutual labels:  utility, string
Bonjourmadame
Say "Hello ma'am!"
Stars: ✭ 9 (-94.27%)
Mutual labels:  utility, emacs
Discover.el
Discover more of emacs with context menus!
Stars: ✭ 153 (-2.55%)
Mutual labels:  emacs
Doom Snippets
The Doom Emacs snippets library
Stars: ✭ 150 (-4.46%)
Mutual labels:  emacs
Writingwithemacs
Tips, Examples, and Resources for Writing with Emacs
Stars: ✭ 150 (-4.46%)
Mutual labels:  emacs
Org Fragtog
Automatically toggle Org mode LaTeX fragment previews as the cursor enters and exits them
Stars: ✭ 149 (-5.1%)
Mutual labels:  emacs
Licia
Useful utility collection with zero dependencies
Stars: ✭ 1,984 (+1163.69%)
Mutual labels:  utility
Sudo
Order bash to do things by shouting.
Stars: ✭ 155 (-1.27%)
Mutual labels:  utility
Php Ip Tools
Useful tools for IP manipulations
Stars: ✭ 152 (-3.18%)
Mutual labels:  utility
Japanese.js
Util collection for Japanese text processing. Hiraganize, Katakanize, and Romanize.
Stars: ✭ 150 (-4.46%)
Mutual labels:  utility
Dart Basic Utils
A dart package for many helper methods fitting common situations
Stars: ✭ 153 (-2.55%)
Mutual labels:  string
Mastodon.el
Emacs client for Mastodon
Stars: ✭ 150 (-4.46%)
Mutual labels:  emacs
Consult
consult.el - Consulting completing-read
Stars: ✭ 153 (-2.55%)
Mutual labels:  emacs
Swiper
Ivy - a generic completion frontend for Emacs, Swiper - isearch with an overview, and more. Oh, man!
Stars: ✭ 1,948 (+1140.76%)
Mutual labels:  emacs
Lunarymacs
Moon-based Emacs configuration.
Stars: ✭ 151 (-3.82%)
Mutual labels:  emacs
Browserselect
Browser Select is a utility to dynamically select the browser you want instead of just having one default for all links.
Stars: ✭ 154 (-1.91%)
Mutual labels:  utility
Weihanli.common
common tools,methods,extension methods etc... .net 常用工具类,公共方法,常用扩展方法等,基础类库
Stars: ✭ 152 (-3.18%)
Mutual labels:  utility
Emacs4cl
A 40 line ~/.emacs to quickly set up vanilla Emacs for Common Lisp programming
Stars: ✭ 151 (-3.82%)
Mutual labels:  emacs
  • underscore -> UPCASE -> CamelCase conversion of names

#+html: #+html:
#+html:

[[https://github.com/akicho8/string-inflection/blob/master/HISTORY.org][Change History]]

** Configuration Examples

*** Example 1

#+BEGIN_SRC elisp (require 'string-inflection)

;; C-q C-u is the key bindings similar to Vz Editor. (global-unset-key (kbd "C-q")) (global-set-key (kbd "C-q C-u") 'my-string-inflection-cycle-auto)

(defun my-string-inflection-cycle-auto () "switching by major-mode" (interactive) (cond ;; for emacs-lisp-mode ((eq major-mode 'emacs-lisp-mode) (string-inflection-all-cycle)) ;; for python ((eq major-mode 'python-mode) (string-inflection-python-style-cycle)) ;; for java ((eq major-mode 'java-mode) (string-inflection-java-style-cycle)) (t ;; default (string-inflection-ruby-style-cycle)))) #+END_SRC

*** Example 2

#+BEGIN_SRC elisp (require 'string-inflection)

;; default (global-set-key (kbd "C-c C-u") 'string-inflection-all-cycle)

;; for ruby (add-hook 'ruby-mode-hook '(lambda () (local-set-key (kbd "C-c C-u") 'string-inflection-ruby-style-cycle)))

;; for java (add-hook 'java-mode-hook '(lambda () (local-set-key (kbd "C-c C-u") 'string-inflection-java-style-cycle)))

;; for python (add-hook 'python-mode-hook '(lambda () (local-set-key (kbd "C-c C-u") 'string-inflection-python-style-cycle)))

#+END_SRC

** How to use

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

In the case of =string-inflection-ruby-style-cycle=

: emacs_lisp => EMACS_LISP => EmacsLisp => emacs_lisp

In the case of =string-inflection-python-style-cycle=

: 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 => Emacs_Lisp => 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-pascal-case-function "emacs_lisp") ; => "EmacsLisp" (string-inflection-camelcase-function "emacs_lisp") ; => "emacsLisp" (string-inflection-upcase-function "emacs_lisp") ; => "EMACS_LISP" (string-inflection-kebab-case-function "emacs_lisp") ; => "emacs-lisp" (string-inflection-capital-underscore-function "emacs_lisp") ; => "Emacs_Lisp"

(string-inflection-pascal-case-p "EmacsLisp") ; => t (string-inflection-pascal-case-p "emacs_lisp") ; => nil ; etc... #+END_SRC

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].