recase 4.1.0 copy "recase: ^4.1.0" to clipboard
recase: ^4.1.0 copied to clipboard

Changes the case of the input text to the desire case convention.

ReCase #

Changes the case of the input text to the desire case convention.

import 'package:recase/recase.dart';

void main() {
  ReCase rc = new ReCase('Just_someSample-text');

  print(rc.camelCase); // Prints 'justSomeSampleText'
  print(rc.constantCase); // Prints 'JUST_SOME_SAMPLE_TEXT'
}

String extensions are also available.

import 'package:recase/recase.dart';

void main() {
  String sample = 'Just_someSample-text';

  print(sample.camelCase); // Prints 'justSomeSampleText'
  print(sample.constantCase); // Prints 'JUST_SOME_SAMPLE_TEXT'
}

This feature is available in version 3.0.0, and requires at least Dart 2.6

Supports:

  • snake_case
  • dot.case
  • path/case
  • param-case
  • PascalCase
  • Header-Case
  • Title Case
  • camelCase
  • Sentence case
  • CONSTANT_CASE
346
likes
150
points
1.55M
downloads

Publisher

unverified uploader

Weekly Downloads

Changes the case of the input text to the desire case convention.

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-2-Clause (license)

More

Packages that depend on recase