Type Function Library string.* Return value Boolean Revision 2017.3060 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