{"id":13862818,"url":"https://github.com/akicho8/string-inflection","last_synced_at":"2025-04-06T06:14:26.576Z","repository":{"id":5016494,"uuid":"6175079","full_name":"akicho8/string-inflection","owner":"akicho8","description":"underscore -\u003e UPCASE -\u003e CamelCase conversion of names","archived":false,"fork":false,"pushed_at":"2024-08-16T05:33:56.000Z","size":153,"stargazers_count":251,"open_issues_count":1,"forks_count":23,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-30T05:07:06.416Z","etag":null,"topics":["emacs","emacs-lisp","inflection","string","utility"],"latest_commit_sha":null,"homepage":"","language":"Emacs Lisp","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"mitmel/Demo-Mode","license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/akicho8.png","metadata":{"files":{"readme":"README.org","changelog":"HISTORY.org","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2012-10-11T14:20:57.000Z","updated_at":"2025-03-26T05:38:25.000Z","dependencies_parsed_at":"2024-10-23T13:57:35.602Z","dependency_job_id":null,"html_url":"https://github.com/akicho8/string-inflection","commit_stats":{"total_commits":82,"total_committers":18,"mean_commits":4.555555555555555,"dds":0.2804878048780488,"last_synced_commit":"50ad54970b3cc79b6b83979bde9889ad9a9e1a9c"},"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akicho8%2Fstring-inflection","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akicho8%2Fstring-inflection/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akicho8%2Fstring-inflection/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akicho8%2Fstring-inflection/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/akicho8","download_url":"https://codeload.github.com/akicho8/string-inflection/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247441063,"owners_count":20939239,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["emacs","emacs-lisp","inflection","string","utility"],"created_at":"2024-08-05T06:01:53.290Z","updated_at":"2025-04-06T06:14:26.556Z","avatar_url":"https://github.com/akicho8.png","language":"Emacs Lisp","readme":"* underscore -\u003e UPCASE -\u003e CamelCase conversion of names\n\n#+html: \u003ca href=\"https://travis-ci.org/akicho8/string-inflection\"\u003e\u003cimg src=\"https://travis-ci.org/akicho8/string-inflection.svg?branch=master\" /\u003e\u003c/a\u003e\n#+html: \u003cbr\u003e\n#+html: \u003cbr\u003e\n\n  [[https://github.com/akicho8/string-inflection/blob/master/HISTORY.org][Change History]]\n\n** Configuration Examples\n\n*** Example 1\n\n#+BEGIN_SRC elisp\n(require 'string-inflection)\n\n;; C-q C-u is similar to the keybinding used by Vz Editor.\n(global-unset-key (kbd \"C-q\"))\n(global-set-key (kbd \"C-q C-u\") 'my-string-inflection-cycle-auto)\n\n(defun my-string-inflection-cycle-auto ()\n  \"switching by major-mode\"\n  (interactive)\n  (cond\n   ;; for emacs-lisp-mode\n   ((eq major-mode 'emacs-lisp-mode)\n    (string-inflection-all-cycle))\n   ;; for python\n   ((eq major-mode 'python-mode)\n    (string-inflection-python-style-cycle))\n   ;; for java\n   ((eq major-mode 'java-mode)\n    (string-inflection-java-style-cycle))\n   ;; for elixir\n   ((eq major-mode 'elixir-mode)\n    (string-inflection-elixir-style-cycle))\n   (t\n    ;; default\n    (string-inflection-ruby-style-cycle))))\n#+END_SRC\n\n*** Example 2\n\n#+BEGIN_SRC elisp\n(require 'string-inflection)\n\n;; default\n(global-set-key (kbd \"C-c C-u\") 'string-inflection-all-cycle)\n\n;; for ruby\n(add-hook 'ruby-mode-hook\n          '(lambda ()\n             (local-set-key (kbd \"C-c C-u\") 'string-inflection-ruby-style-cycle)))\n\n;; for elixir\n(add-hook 'elixir-mode-hook\n          '(lambda ()\n             (local-set-key (kbd \"C-c C-u\") 'string-inflection-elixir-style-cycle)))\n\n;; for java\n(add-hook 'java-mode-hook\n          '(lambda ()\n             (local-set-key (kbd \"C-c C-u\") 'string-inflection-java-style-cycle)))\n\n;; for python\n(add-hook 'python-mode-hook\n          '(lambda ()\n             (local-set-key (kbd \"C-c C-u\") 'string-inflection-python-style-cycle)))\n\n#+END_SRC\n\n** How to Use\n\nFor each of the following, place the cursor at =emacs_lisp= and type =C-q C-u=, the results will be as follows:\n\nIn the case of =string-inflection-ruby-style-cycle=\n\n   : emacs_lisp =\u003e EMACS_LISP =\u003e EmacsLisp =\u003e emacs_lisp\n\nIn the case of =string-inflection-elixir-style-cycle=\n\n   : emacs_lisp =\u003e EmacsLisp =\u003e emacs_lisp\n\nIn the case of =string-inflection-python-style-cycle=\n\n   : emacs_lisp =\u003e EMACS_LISP =\u003e EmacsLisp =\u003e emacs_lisp\n\nIn the case of =string-inflection-java-style-cycle=\n\n   : emacsLisp =\u003e EMACS_LISP =\u003e EmacsLisp =\u003e emacsLisp\n\nIn the case of =string-inflection-all-cycle=\n\n   : emacs_lisp =\u003e EMACS_LISP =\u003e EmacsLisp =\u003e emacsLisp =\u003e emacs-lisp =\u003e Emacs_Lisp =\u003e emacs_lisp\n\nIt is recommended that the major mode functions are used instead of =string-inflection-all-cycle=.\n\n** Standalone Functions\n\n#+BEGIN_SRC elisp\n(string-inflection-underscore-function \"EmacsLisp\")           ; =\u003e \"emacs_lisp\"\n(string-inflection-pascal-case-function \"emacs_lisp\")         ; =\u003e \"EmacsLisp\"\n(string-inflection-camelcase-function \"emacs_lisp\")           ; =\u003e \"emacsLisp\"\n(string-inflection-upcase-function \"emacs_lisp\")              ; =\u003e \"EMACS_LISP\"\n(string-inflection-kebab-case-function \"emacs_lisp\")          ; =\u003e \"emacs-lisp\"\n(string-inflection-capital-underscore-function \"emacs_lisp\")  ; =\u003e \"Emacs_Lisp\"\n\n(string-inflection-pascal-case-p \"EmacsLisp\")                 ; =\u003e t\n(string-inflection-pascal-case-p \"emacs_lisp\")                ; =\u003e nil\n; etc...\n#+END_SRC\n\n** Region usage\n\nYou can also use this library to convert a region's casing.  That applies the\noperation to all symbols of the region. If a symbol is only partially covered\nby the region, the operation is performed only on that part.\n\nFor that, simply select a region and perform =M-x string-inflection-kebab-case= (or any such other function).\n\n** Other configuration options\n\nYou can configure where the cursor shall finish after the inflection operation\nusing the =string-inflection-final-position= customization option.\n","funding_links":[],"categories":["Emacs Lisp"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakicho8%2Fstring-inflection","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fakicho8%2Fstring-inflection","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakicho8%2Fstring-inflection/lists"}