{"id":17623903,"url":"https://github.com/ryonakano/chcase","last_synced_at":"2026-01-07T17:39:31.961Z","repository":{"id":45342127,"uuid":"286059863","full_name":"ryonakano/chcase","owner":"ryonakano","description":"A small library to convert case of a given string","archived":false,"fork":false,"pushed_at":"2024-05-09T14:44:12.000Z","size":209,"stargazers_count":6,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-29T10:08:33.214Z","etag":null,"topics":["glib","meson","regex","text-tools","vala","vala-library"],"latest_commit_sha":null,"homepage":"https://ryonakano.github.io/chcase/chcase","language":"Vala","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ryonakano.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2020-08-08T14:35:41.000Z","updated_at":"2024-05-09T14:44:16.000Z","dependencies_parsed_at":"2025-02-05T03:53:12.781Z","dependency_job_id":"62255264-703b-4d99-a2fe-abc36562d557","html_url":"https://github.com/ryonakano/chcase","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryonakano%2Fchcase","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryonakano%2Fchcase/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryonakano%2Fchcase/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryonakano%2Fchcase/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ryonakano","download_url":"https://codeload.github.com/ryonakano/chcase/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246266252,"owners_count":20749754,"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":["glib","meson","regex","text-tools","vala","vala-library"],"created_at":"2024-10-22T21:43:19.093Z","updated_at":"2026-01-07T17:39:31.956Z","avatar_url":"https://github.com/ryonakano.png","language":"Vala","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ChCase\nChCase is a small library to convert case of a given string between camelCase, PascalCase, snake_case, kebab-case, Sentence case, and space-separated.\n\nThis is my first attempt to create a library (yet small and straightforward though).\n\n## Usage\n### 1. Declare as a Dependency\n#### For Flatpak Apps\nIf you want to use this library in a *flatpaked* app, simply call it as a module:\n\n```yaml\nmodules:\n  - name: chcase\n    buildsystem: meson\n    sources:\n      - type: git\n        url: https://github.com/ryonakano/chcase.git\n        tag: '2.1.0'\n```\n\nThen call `chcase` in your meson file:\n\n```meson\nexecutable(\n  meson.project_name(),\n  'src/Application.vala',\n  dependencies: [\n    dependency('gtk+-3.0'),\n    dependency('chcase'),\n  ],\n  install: true,\n)\n```\n\nNow you can use the library in your project.\n\n#### For Other Packages (e.g. Debian Packaging)\nThis library is not (yet) provided as a package for any distributions, so the best way to use it to your project is to embed it as a git submodule:\n\n```bash\ngit submodule add https://github.com/ryonakano/chcase subprojects/chcase\n```\n\nLoad the embeded chcase library as a dependency in the root `meson.build`:\n\n```meson\nchcase_subproject = subproject('chcase')\nchcase_deps = chcase_subproject.get_variable('libchcase')\n```\n\nAdd the loaded `chcase_deps` in the dependencies list in `meson.build` that has `executable` method:\n\n```meson\nexecutable(\n  meson.project_name(),\n  'src/Application.vala',\n  dependencies: [\n    dependency('gtk+-3.0'),\n    chcase_deps,\n  ],\n  install: true,\n)\n```\n\nNow you can use the library in your project.\n\n### 2. Start Coding\n\nSet the case for input string and result string and then perform conversion.\n\n```vala\nvar converter = new ChCase.Converter.with_case (ChCase.Case.SPACE_SEPARATED, ChCase.Case.CAMEL);\nstring input_text = \"say hello to ChCase\";\nstring output_text = converter.convert_case (input_text);\nstdout.printf (\"Input: %s / Output: %s\\n\", input_text, output_text);\n// Result\n// Input: say hello to ChCase / Output: sayHelloToChCase\n```\n\nThere is [an example code](examples/Application.vala) prepared in this repository, so it may help you.\n\n## Building and Installation\nIf you mean to perform code changes and create a pull request against this project, you may want to build and install the library from source code.\n\nYou'll need the following dependencies:\n\n* libglib2.0-dev\n* meson (\u003e= 0.56.0)\n* valac\n\nRun `meson setup` to configure the build environment and run `meson compile` to build:\n\n```bash\nmeson setup builddir --prefix=/usr\nmeson compile -C builddir\n```\n\nTo install, use `meson install`:\n\n```bash\nmeson install -C builddir\n```\n\nYou can optionally build and run a demo app:\n\n```bash\nmeson configure builddir -Ddemo=true\nmeson compile -C builddir\n./builddir/examples/example\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryonakano%2Fchcase","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fryonakano%2Fchcase","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryonakano%2Fchcase/lists"}