Skip to content
pubscout

dart_casing

3.0.1, released 3 years ago by jesway.com

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

WASM-ready
$ flutter pub add dart_casing
Source repository

What it does

Provides casing utilities to convert strings between different conventions like camelCase, PascalCase, snake_case, kebab-case, dot.case, constantCase, titleCase, lowerCase, and upperCase. Handles various input formats including digits and symbols.

AI-written summary of version 3.0.1, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need to format strings into camelCase, snake_case, kebab-case, or other conventions.
  • You are processing raw text inputs that use mixed casing styles.

Skip it when

  • You need heavy natural language processing or full localization support.

Strengths

  • Supports a wide variety of case styles.
  • Handles multiple input formats and edge cases like digits and symbols cleanly.

Weaknesses

  • Limited to string case conversions.

Setup

Kind
Pure Dart
Effort
Low
Code generation
No
Direct dependencies
0

Not documented

import 'package:dart_casing/dart_casing.dart';

main() {
  var text = "Lorem-ipsum_dolor\SIT amet";
  print(Casing.camelCase(text)); // loremIpsumDolorSitAmet
  print(Casing.snakeCase(text)); // lorem_ipsum_dolor_sit_amet
}

Alternatives

Packages that do the same job and could replace dart_casing.