ContainsStr

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

Description

The ContainsStr function returns true when the value string contains 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 within value.

Returns

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

Examples

The following query demonstrates the case where the value string contains the search string:

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

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

Not available in this language yet.
Not available in this language yet.
System.out.println(
    client.query(
        ContainsStr("Fauna", "q")
    ).get()
);
client.query(
  q.ContainsStr('Fauna', 'q')
)
.then((ret) => console.log(ret))
Not available in this language yet.
Not available in this language yet.
println(Await.result(
  client.query(
    ContainsStr("Fauna", "q"),
  ),
  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!