inflection3 0.5.3+2 copy "inflection3: ^0.5.3+2" to clipboard
inflection3: ^0.5.3+2 copied to clipboard

Grammatical Inflection encoders.

example/main.dart

import 'package:inflection3/inflection3.dart';

main() {
  // Using 'shortcut' functions.

  print(pluralize("house")); // => "houses"
  print(convertToPlural("house")); // => "houses", alias for pluralize
  print(pluralizeVerb("goes")); // => "go"
  print(singularize("axes")); // => "axis"
  print(convertToSingular("axes")); // => "axis", alias for pluralize
  print(singularizeVerb("write")); // => "writes"
  print(convertToSnakeCase("CamelCaseName")); // => "camel_case_name"
  print(convertToSpinalCase("CamelCaseName")); // => "camel-case-name"
  print(past("forgo")); // => "forwent"

  // Using default encoders.

  print(PLURAL.convert("virus")); // => "viri"
  print(SINGULAR.convert("Matrices")); // => "Matrix"
  print(SINGULAR.convert("species")); // => "species"
  print(SNAKE_CASE.convert("CamelCaseName")); // => "camel_case_name"
  print(SPINAL_CASE.convert("CamelCaseName")); // => "camel-case-name"
  print(PAST.convert("miss")); // => "missed"
}
4
likes
130
points
1
downloads

Publisher

unverified uploader

Weekly Downloads

Grammatical Inflection encoders.

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (license)

More

Packages that depend on inflection3