philiprehberger_string_ext 0.1.1 copy "philiprehberger_string_ext: ^0.1.1" to clipboard
philiprehberger_string_ext: ^0.1.1 copied to clipboard

String extension methods for case conversion, truncation, masking, and validation

example/example.dart

import 'package:philiprehberger_string_ext/string_ext.dart';

void main() {
  // Case conversion
  print('hello world'.capitalized); // Hello world
  print('hello world'.titleCase);   // Hello World
  print('hello world'.camelCase);   // helloWorld
  print('helloWorld'.snakeCase);    // hello_world
  print('helloWorld'.kebabCase);    // hello-world

  // Manipulation
  print('Hello World'.truncate(5));              // Hello...
  print('4111111111111111'.mask(start: 4, end: 12)); // 4111********1111
  print('hello'.reversed);                        // olleh

  // Validation
  print('user@example.com'.isEmail); // true
  print('  '.isBlank);              // true
  print('12345'.isNumeric);         // true
}
0
likes
160
points
--
downloads

Documentation

API reference

Publisher

verified publisherphiliprehberger.com

String extension methods for case conversion, truncation, masking, and validation

Homepage
Repository (GitHub)
View/report issues

License

MIT (license)

More

Packages that depend on philiprehberger_string_ext