ePrivacy and GPDR Cookie Consent by CookieConsent.com
menu

Dart string endsWith() method

Definition and usage


endsWith() method in dart is used for checking if a string a is present at the end of string b.
If the string matches then it will return true otherwise return false.
This method is case sensitive.

Syntax

string.endsWith(string other_string);


Parameter value


+--------------+-------------------------------------------+
| Parameter    | Description                               |
+--------------+-------------------------------------------+
| other_string | Required! This string will be checked if  |
|              | present or not at the end.                |
+--------------+-------------------------------------------+

More technical details


+-------------+----------------------------------------+
| return type | bool! This method returns a bool type. |
+-------------+----------------------------------------+

Example


Comments