Skip to main content

begins with

Type

operator

Summary

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

Syntax

<string> begins with <prefix>

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.

Parameters

NameTypeDescription

string

string

prefix

Examples

"foobar" begins with "foo" -- evaluates to true
"foobar" begins with "food" -- evaluates to false

property: caseSensitive

function: offset, length

glossary: property

operator: ends with, contains

Compatibility and Support

Introduced

LiveCode 2.9

OS

mac

windows

linux

ios

android

Platforms

desktop

server

mobile

Thank you for your feedback!

Was this page helpful?