endsWith (Function)
Signature: endsWith(s: string, suffix: string) -> bool
Description: True if s ends with suffix.
Parameters
- s (
string): The string to test - suffix (
string): The suffix to look for
Returns: bool
Example
print(endsWith("image.png", ".png")) // true
print (endsWith ("image.png", ".png")) // true