ContainsStr
ContainsStr( value, search )
ContainsStr( value, search )
ContainsStr( value, search )
ContainsStr( value, search )
contains_str( value, search )
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.
Examples
The following query demonstrates the case where the value
string
contains the search
string:
Value result = await client.Query(
ContainsStr("Fauna", "a")
);
IResult<Value> data = result.To<Value>();
data.Match(
Success: value => Console.WriteLine($"{value}"),
Failure: error => Console.WriteLine($"Query failed:\n{error}")
);
result, err := client.Query(
f.ContainsStr("Fauna", "a"))
if (err != nil) {
fmt.Println(err)
} else {
fmt.Println(result)
}
System.out.println(
client.query(
ContainsStr("Fauna", "a")
).get()
);
client.query(
q.ContainsStr('Fauna', 'a')
)
.then((ret) => console.log(ret))
print(client.query(
q.contains_str("Fauna", "a")
))
Not available in this language yet.
println(Await.result(
client.query(
ContainsStr("Fauna", "a"),
),
5.seconds
))
Not available in this language yet.
BooleanV(True)
true
true
true
True
true
The following query demonstrates the case where the value
string
does not contain the search
string:
Value result = await client.Query(
ContainsStr("Fauna", "q")
);
IResult<Value> data = result.To<Value>();
data.Match(
Success: value => Console.WriteLine($"{value}"),
Failure: error => Console.WriteLine($"Query failed:\n{error}")
);
result, err := client.Query(
f.ContainsStr("Fauna", "q"))
if (err != nil) {
fmt.Println(err)
} else {
fmt.Println(result)
}
System.out.println(
client.query(
ContainsStr("Fauna", "q")
).get()
);
client.query(
q.ContainsStr('Fauna', 'q')
)
.then((ret) => console.log(ret))
print(client.query(
q.contains_str("Fauna", "q")
))
Not available in this language yet.
println(Await.result(
client.query(
ContainsStr("Fauna", "q"),
),
5.seconds
))
Not available in this language yet.
BooleanV(False)
false
false
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!