Difference between revisions of "Ends with"

From Kolmafia
Jump to navigation Jump to search
(Created page with "<onlyinclude>{{{{{format|Function2}}} |name=ends_with |function1.return_type=boolean |function1.description=Checks whether a string ends with a suffix string. (case-sensitive)...")
(No difference)

Revision as of 12:13, 23 December 2020

Function Syntax

boolean ends_withstring value, string suffix )

Checks whether a string ends with a suffix string. (case-sensitive)
  • value: String to check
  • suffix: Suffix to search for

This function was added in r17911.

Code Samples

The following function call will return true:

starts_with( "The quick brown fox jumps over the lazy dog", "lazy dog" );

See Also

contains_text() | ends_with() | index_of() | last_index_of() | starts_with()