This library contains utilities for processing strings, such as higher level functions for getting the highest matched string from given a list of strings and a string to match, as well as lower level functions such as getting the number of words matched in the given string(s). Strings can be matched taking into consideration things like article ("a", "an", and "the") and special characters. There are also utility functions to aid in parsing strings, such as removing special characters around the words in a string.
import 'package:string_processor/string_processor.dart'; void main() => print(getHighestMatch( ['I am a boy', 'Bob the Builder is fun'], 'Bob is a boy.', ignoreArticles: true, matchCaseInsensitively: false));
Add this to your package's pubspec.yaml file:
dependencies: string_processor: ^1.0.2
You can install packages from the command line:
$ pub get
$ flutter packages get
Alternatively, your editor might support
pub get or
flutter packages get.
Check the docs for your editor to learn more.
Now in your Dart code, you can use:
|2.0.1||Apr 14, 2019|
|2.0.0||Feb 23, 2019|
|1.0.3||Oct 19, 2018|
|1.0.2||Oct 19, 2018|
|1.0.1||Oct 19, 2018|
|1.0.0||Oct 19, 2018|
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
We analyzed this package on May 8, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:
Detected platforms: Flutter, web, other
No platform restriction found in primary library
lib/string_processor.dart. (-0.50 points)
lib/string_processor.dart reported 1 hint:
line 187 col 7: Use isNotEmpty instead of length
The package description is too short. (-20 points)
Add more detail to the
description field of
pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.