Dart String Manipulations: Strings startWith & endsWith

Jeet BhaluJeet Bhalu
1 min read

StartWith:

  • A startWith() is in string a start is check your sentence is your word and character is ok to use character check.

Example:

void main()
{
    String str = "Hello World!";

    print(str.startsWith('H'));

}

Output:

true

EndWith:

  • your string is check to character in multiple data to verify character to use endWith() method

Example:

void main()
{
      String str = "Hello World!";

      print(str.endsWith('d')); // false
}

Output:

false
0
Subscribe to my newsletter

Read articles from Jeet Bhalu directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Jeet Bhalu
Jeet Bhalu

i am Jeet Bhalu i am flutter App developer