StartsWith

Not available in this language yet.
Not available in this language yet.
StartsWith( value, search )
StartsWith( value, search )
Not available in this language yet.
Not available in this language yet.
StartsWith( value, search )
Not available in this language yet.

Description

The StartsWith function returns true when the value string starts with the search string, or false when it does not.

Parameters

Argument Type Definition and Requirements

value

The string to compare.

search

The string to search for at the start of value.

Returns

Returns a boolean: true when value starts with search, or false when it does not.

Examples

The following query demonstrates the case where the value string starts with the search string:

Not available in this language yet.
Not available in this language yet.
System.out.println(
    client.query(
        StartsWith("Fauna", "F")
    ).get()
);
client.query(
  q.StartsWith('Fauna', 'F')
)
.then(ret => console.log(ret))
Not available in this language yet.
Not available in this language yet.
println(Await.result(
  client.query(
    StartsWith("Fauna", "F"),
  ),
  5.seconds
))
Not available in this language yet.
true
true
true

The following query demonstrates the case where the value string does not start with the search string:

Not available in this language yet.
Not available in this language yet.
System.out.println(
    client.query(
        StartsWith("Fauna", "f")
    ).get()
);
client.query(
  q.StartsWith('Fauna', 'f')
)
.then(ret => console.log(ret))
Not available in this language yet.
Not available in this language yet.
println(Await.result(
  client.query(
    StartsWith("Fauna", "f"),
  ),
  5.seconds
))
Not available in this language yet.
false
false
false

Was this article helpful?

We're sorry to hear that.
Tell us how we can improve! documentation@fauna.com

Thank you for your feedback!