LTrim
LTrim( value )
LTrim( value )
LTrim( value )
LTrim( value )
ltrim( value )
LTrim( value )
Description
The LTrim
function removes all white spaces, tabs, and newlines from
the beginning of the provided string.
Parameters
Argument | Type | Definition and Requirements |
---|---|---|
|
The string from which to remove leading spaces, tabs, and newlines. |
Examples
The following query below executes an array of independent LTrim
operations and returns the results in an array. The result array
position matches the execution array position. The individual operations
are:
-
The string " Fire" is processed, resulting in "Fire" which becomes the first item in the result array.
-
The string "\t\n Fire" is processed, resulting in "Fire", which becomes the second item in the result array.
Value result = await client.Query(
Arr(
LTrim(" Fire"),
LTrim("\t\n\r Fire")
)
);
Console.WriteLine(result);
Arr(StringV(Fire), StringV(Fire))
result, err := client.Query(
f.Arr{
f.LTrim(" Fire"),
f.LTrim("\t\n\r Fire"),
})
if err != nil {
fmt.Fprintln(os.Stderr, err)
} else {
fmt.Println(result)
}
[Fire Fire]
System.out.println(
client.query(
Arr(
LTrim(" Fire"),
LTrim("\t\n\r Fire")
)
).get());
["Fire", "Fire"]
client.query(
[
q.LTrim(' Fire'),
q.LTrim('\t\n\r Fire'),
]
)
.then((ret) => console.log(ret))
.catch((err) => console.error('Error: %s', err))
[ 'Fire', 'Fire' ]
result = client.query(
[
q.ltrim(" Fire"),
q.ltrim("\t\n\r Fire")
]
)
print(result)
['Fire', 'Fire']
println(Await.result(
client.query(
Arr(
LTrim(" Fire"),
LTrim("\t\n\r Fire")
)
),
5.seconds
))
["Fire", "Fire"]
Was this article helpful?
We're sorry to hear that.
Tell us how we can improve!
Visit Fauna's forums
or email docs@fauna.com
Thank you for your feedback!