suffix?

check if string ends with given suffix


Parameters

suffix? string :string
        suffix :char :string :regex

Returns

  • :logical

Examples

copy
suffix? "hello" "lo" ; => true suffix? "boom" "lo" ; => false

copy
suffix? "hello" {/\w/} ; => true suffix? "world" {/\d/} ; => false

copy
suffix? "hello" 'o' ; => true suffix? "world" 'o' ; => false

Related