endsWith
Modified on Wed, 16 Aug 2023
Description
Check if string ends with the given target string
Syntax
ends_with(text, target)
Parameters
Input Parameter | Type | Description |
---|---|---|
text | string | The string to inspect. |
target | string | The string to search for |
Return value
Type |
---|
boolean |
Sample
Example | Result | Description |
---|---|---|
ends_with('abcd', 'cd') | true | Check if the text ends with 'cd' |
ends_with('abcd', 'b') | false | Check if the text ends with 'b' |
To view all the String functions, click here.
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article