change_case 2.1.0 copy "change_case: ^2.1.0" to clipboard
change_case: ^2.1.0 copied to clipboard

An extension on String for the missing methods for camelCase, PascalCase, Capital Case, snake_case, param-case, CONSTANT_CASE and others.

example/main.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();
}
51
likes
160
pub points
95%
popularity

Publisher

verified publishermrgnhnt.com

An extension on String for the missing methods for camelCase, PascalCase, Capital Case, snake_case, param-case, CONSTANT_CASE and others.

Repository (GitHub)
View/report issues

Topics

#formatting #case #casing #camelcase #snakecase

Documentation

API reference

License

MIT (license)

Dependencies

meta

More

Packages that depend on change_case