change_case 1.0.0+2 copy "change_case: ^1.0.0+2" to clipboard
change_case: ^1.0.0+2 copied to clipboard

outdated

An extension on String to transform a string between camelCase, PascalCase, Capital Case, snake_case, param-case, CONSTANT_CASE and others.

example/lib/example.dart

import 'package:change_case/change_case.dart';

void main() {
  // returns: 'testString'
  'test string'.toCamelCase();

  // returns: 'Test String'
  'test string'.toCapitalCase();

  // returns: 'TEST_STRING'
  'test string'.toConstantCase();

  // returns: 'test.string'
  'test string'.toDotCase();

  // returns: 'Test-String'
  'test string'.toHeaderCase();

  // returns: 'test string'
  'testString'.toNoCase();

  // returns: 'test-string'
  'test string'.toParamCase();

  // returns: 'TestString'
  'test string'.toPascalCase();

  // returns: 'test/string'
  'test string'.toPathCase();

  // returns: 'Test string'
  'testString'.toSentenceCase();

  // returns: 'test_string'
  'test string'.toSnakeCase();

  // returns: 'A Simple Test'
  'a simple test'.toTitleCase();

  // returns: 'tEST sTRING'
  'Test String'.toSwapCase();

  // returns: true
  'test string'.isLowerCase();

  // returns: false
  'test string'.isUpperCase();

  // returns: 'tEST'
  'TEST'.toLowerFirstCase();

  // returns: 'Test'
  'test'.toUpperFirstCase();

  // returns: 'tEst stRINg'
  'Test String'.toSpongeCase();
}
49
likes
0
pub points
95%
popularity

Publisher

verified publishermrgnhnt.com

An extension on String to transform a string between camelCase, PascalCase, Capital Case, snake_case, param-case, CONSTANT_CASE and others.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

meta

More

Packages that depend on change_case