inflect ~master
A inflection library in D
To use this package, run the following command in your project's root directory:
Manual usage
Put the following dependency into your project's dependences section:
inflect
A inflection library for D projects.
License
The code in this repository is licensed under AGPL-3.0-or-later; for more details see the LICENSE
file in the repository.
Usage
Currently, the library only supports pluralization:
import inflect;
assert("method".pluralize() == "methods");
Per default only the english pluralization backend is registered. To register your own:
import inflect;
class MyCustomInflections : Inflections {
string pluralize(string inp, int count) shared const {
// ...
}
}
mixin RegisterInflections!("my-locale", MyCustomInflections);
Roadmap
- support more inflection types like singularization
- support more transformative actions like camelcase
- Registered by Mai Lapyst
- ~master released a year ago
- Mai-Lapyst/inflect-d
- AGPL-3.0-or-later
- Copyright © 2023, mai-lapyst
- Authors:
- Dependencies:
- none
- Versions:
-
1.0.0 2023-Oct-03 ~master 2023-Oct-03 - Download Stats:
-
-
0 downloads today
-
0 downloads this week
-
0 downloads this month
-
6 downloads total
-
- Score:
- 0.3
- Short URL:
- inflect.dub.pm