Description

Library to perform basic string transforms (camelCase, snake_case and plurals)

Package Information

Version1.0.0 (2016-Jan-30)
Repository https://github.com/intrica/string-transform.d
LicenseMIT
CopyrightCopyright © 2016, David Monagle
AuthorsDavid Monagle
Registered byDavid Monagle
Dependencies none

Installation

To use this package, put the following dependency into your project's dependencies section:

dub.json
dub.sdl

Readme

String Transforms D

Basic inflection and pluralization libarary for D

Currently includes only English for pluralization but is enough of a framework to add other languages easily enough.

Case Example

import transforms.camel;
import transforms.snake;

auto camel = "get_http_response_code".camelCase;
assert (camel == "getHttpResponseCode");

auto snake = camel.snakeCase;
assert (snake == "get_http_response_code");

Pluralization Example

import inflections.en;

assert("apple".pluralize == "apples");
assert("apples".singularize == "apple");

Available versions

1.0.0 ~master