Concat
Concat( value, [ separator ] )
Concat( value, [ separator ] )
Concat( value, [ separator ] )
Concat( value, [ separator ] )
concat( value, [ separator ] )
Concat( value, [ separator ] )
Description
The Concat
function returns a string which has joined a list of
strings into a single string.
Parameters
Argument | Type | Definition and Requirements |
---|---|---|
|
Array of Strings |
An array of strings to join. |
|
String |
Optional - This value is placed between each joined string. Default is an empty string (""). |
Examples
The following query takes an array of Strings containing "Hen" and "Wen"
as its first argument and a separator of a space (" ") as its second
argument. The result of the Concat
operation is "Hen Wen".
try
{
Value result = await client.Query(
Concat(Arr("Hen", "Wen"), " ")
);
Console.WriteLine(result);
}
catch (Exception e)
{
Console.WriteLine($"ERROR: {e.Message}");
}
StringV(Hen Wen)
result, err := client.Query(
f.Concat(f.Arr{"Hen", "Wen"}, f.Separator(" ")))
if err != nil {
fmt.Fprintln(os.Stderr, err)
} else {
fmt.Println(result)
}
Hen Wen
System.out.println(
client.query(
Concat(Arr(Value("Hen"), Value("Wen")), Value(" "))
).get());
"Hen Wen"
client.query(
q.Concat(['Hen', 'Wen'], ' ')
)
.then((ret) => console.log(ret))
.catch((err) => console.error('Error: %s', err))
Hen Wen
result = client.query(
q.concat(["Hen", "Wen"], " ")
)
print(result)
Hen Wen
try {
println(Await.result(
client.query(Concat(Arr("Hen", "Wen"), " ")),
5.seconds
))
} catch {
case unknown: Throwable => println("Error: " + unknown.getMessage())
}
"Hen Wen"
Was this article helpful?
We're sorry to hear that.
Tell us how we can improve!
Visit Fauna's Discourse forums
or email docs@fauna.com
Thank you for your feedback!