I want to check weather a String contains or not a specific substring in dart/flutter.
example
String mainString = "toyota allion 260 2010";
String substring = "allion";
I want to check weather substring is in the mainString or not?
Please help me to find a solution
String mainString = "toyota allion 260 2010";
String substring = "allion";
mainString.contains(substring); //return true if contains
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With