begins with

Typeoperator
DictionaryLCS
LibraryLiveCode Script
Syntax
<string> begins with <prefix>
Summary

The begins with operator takes two strings and returns true if the second string matches the start of the first string.

Introduced2.9
OSmac, windows, linux, ios, android
Platformsdesktop, server, mobile
Parameters
NameTypeDescription
string
prefix
Example
"foobar" begins with "foo" -- evaluates to true
"foobar" begins with "food" -- evaluates to false
RelatedProperty: caseSensitive
Operator: ends with, contains
Function: offset, length
Glossary: property
Description

For the expression to evaluate to true the whole of prefix must be present at the beginning of string. For example, if prefix has three characters these must match the first three characters of string (in order).

This operator takes into consideration the current value of the caseSensitive property.