Space

Space( count )
Space( count )
Space( count )
Space( count )
space( count )
Space( count )

Description

The space function returns a string of the specified number of spaces.

Parameters

Argument Type Definition and Requirements

count

The number of spaces to be returned.

Returns

A string which has the specified number of spaces.

Examples

The following query executes an array of independent Space operations and returns the results in an array. The result array position matches the execution array position. The first operation takes the count of 1 and returns a string with a single space, placing it in the top position of the result array. The second operation calls Space with a count of 20 and returns a string of 20 spaces, placing it in the second position of the result array:

Value result = await client.Query(
    Arr(
        Space(1),
        Space(20)
    )
);

Console.WriteLine(result);
Arr(StringV( ), StringV(                    ))
result, err := client.Query(
	f.Arr{
		f.Space(1),
		f.Space(20),
	})

if err != nil {
	fmt.Fprintln(os.Stderr, err)
} else {
	fmt.Println(result)
}
[                      ]
System.out.println(
    client.query(
        Arr(
            Space(1),
            Space(20)
        )
    ).get());
[" ", "                    "]
client.query(
  [
    q.Space(1),
    q.Space(20),
  ]
)
.then((ret) => console.log(ret))
.catch((err) => console.error('Error: %s', err))
[ ' ', '                    ' ]
result = client.query(
  [
    q.space(1),
    q.space(20),
  ]
)
print(result)
[' ', '                    ']
println(Await.result(
    client.query(
        Arr(
            Space(1),
            Space(20)
        )
    ),
    5.seconds
))
[" ", "                    "]

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!