startsWith

Syntax

startsWith(X, str)

Arguments

X is a string scalar/vector.

str is a string scalar.

Details

Check if X starts with str. If yes, return true; otherwise return false.

Examples

$ startsWith('ABCDEF!', "ABC");
1

$ startsWith('ABCDEF!', "ABD");
0