dart_casing 1.0.1

Dart native js
Flutter Android iOS web

Dart library for changing String case style to the desired convention.

dart_casing #

pub package

Dart library for changing String case style to the desired convention.

Installation #

Add this to your package's pubspec.yaml file:

dependencies:
  dart_casing: <latest version>

Usage #

import 'package:dart_casing/dart_casing.dart';

main()
{
  var text = "Lorem-ipsum_dolor\\SIT amet";

  print(Casing.camelCase(text));                   // loremIpsumDolorSitAmet
  print(Casing.pascalCase(text));                  // LoremIpsumDolorSitAmet
  print(Casing.titleCase(text));                   // Lorem Ipsum Dolor Sit Amet
  print(Casing.titleCase(text, separator: "_"));   // Lorem_Ipsum_Dolor_Sit_Amet
  print(Casing.snakeCase(text));                   // lorem_ipsum_dolor_sit_amet
  print(Casing.paramCase(text));                   // lorem-ipsum-dolor-sit-amet
  print(Casing.constantCase(text));                // LOREM_IPSUM_DOLOR_SIT_AMET
  print(Casing.lowerCase(text, separator: " "));   // lorem ipsum dolor sit amet
  print(Casing.upperCase(text, separator: " "));   // LOREM IPSUM DOLOR SIT AMET
}

Issues #

Please file any issues, bugs or feature request here.

License #

This project is licensed under the MIT License

Author #

This Dart package is developed by Florin Bratan. You can contact me at florin@leadcode.dev

2
likes
90
pub points
72%
popularity

Publisher

leadcode.dev

Dart library for changing String case style to the desired convention.

Homepage
Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

More

Packages that depend on dart_casing