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

A Dart language Common Utility package, that makes your code faster,easier and cleaner. contains lots of useful functions for Dart primitive types (support all Flutter platforms)

example/lib/main.dart

import 'package:common_utilities/common_utilities.dart';

void main() {
  String yourStr = 'If you want something you have never had you must do something you have never done';

  String result = yourStr.stringUtils().subStringBetween('want', 'never');
  // print(result) =>  'something you have'

  List<String> result2 = yourStr.stringUtils().subStringsBetween('you', 'never');
  // print(result2) =>  ['something you have' , 'must do something you have']

  String result3 = yourStr.stringUtils().subStringAfter('something');
  // print(result3) =>  'you have never had you must do something you have never done'

  bool lastIndex = true; //This is optional & its false by default
  String result4 = yourStr.stringUtils().subStringAfter('something', lastIndex);
  // print(result4) =>  'you have never done'

  String str = CommonUtils.getRandomString(10);
  // print(str) =>  'btorklcvxw'

}
35
likes
130
pub points
11%
popularity

Publisher

verified publishermobilesoft98.dev

A Dart language Common Utility package, that makes your code faster,easier and cleaner. contains lots of useful functions for Dart primitive types (support all Flutter platforms)

Repository (GitHub)
View/report issues

Topics

#common-utilities #common-utils #string-utils #utils #utility

Documentation

API reference

License

MIT (license)

Dependencies

flutter, intl

More

Packages that depend on common_utilities