- :logical
prefix?
check if string starts with given prefix
Parameters
prefix? string :string prefix :char :string :regex
Returns
Examples
copyprefix? "hello" "he" ; => true prefix? "boom" "he" ; => false
copyprefix? "hello" {/\w+/} ; => true prefix? "world" {/\d+/} ; => false
copyprefix? "hello" 'h' ; => true