Returns true if the string ends with any of $substrings, false otherwise

string:starts_with_any?(STRING $string, ARRAY $substrings, BOOL $case_sensitive=TRUE) : BOOL

string:starts_with_any?("foo",['p','f','c'])
#=> TRUE

string:starts_with_any?("foo",['p','n','c'])
#=> FALSE


string:starts_with_any?("foo boo",['boo','Foo'])
#=> FALSE

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

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

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

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