string:ends_with_any?(STRING string
, ARRAY substrings
, case_sensitive: TRUE) : BOOL

string:ends_with_any?("foo",['o','b','c'])
#=> TRUE

string:ends_with_any?("foo boo",['boo','foo'])
#=> TRUE

# note: empty string is considerd to be part of all strings
string:ends_with_any?("foo boo",[''])
#=> TRUE

# note: provide third argument to make it case-insensitive
string:ends_with_any?("foo boo",['Boo'], FALSE)
#=> TRUE

string:ends_with_any?("",[''])
#=> TRUE

Copyright ©2013-2022 SunSed®. All rights reserved.