Type Function Library string.* Return value Boolean Revision Release 2022.3683 Keywords string, ends See also string.starts()
Returns a boolean true
or false
depending on whether a given string ends with the specified suffix
characters.
string.ends( s, suffix )
String. The string to be checked.
String. A string indicating the suffix to check against.
print( string.ends( "Test123", "123" ) ) --> true print( string.ends( "Test123", "12" ) ) --> false print( string.ends( "12345678", "5678" ) ) --> true print( string.ends( "12345678", "56789" ) ) --> false