lost 0.0.1 lost: ^0.0.1 copied to clipboard
A package for finding in a string
lost #
A package for finding
Hecho en 🇵🇷 por Radamés J. Valentín Reyes
Import the library/package #
import 'package:lost/lost.dart';
Searching a string #
returns true if an instance of the query is found.
String myString = "Mi perrito ladra";
String query = "mi";
print(myString.search(query));
Amount of instances #
returns an integer representing the amount of instances of the query found on the String
String myString = "Mi perrito ladra";
String query = "Perri mi la";
print(myString.instancesOf(query));
Technical details #
- Queries are assumed to be separated by a space, this library may not work with languages like Japanese which don't use spaces unless you separate each character using a space.