TitleCase

TitleCase( value )
TitleCase( value )
TitleCase( value )
TitleCase( value )
titlecase( value )
TitleCase( value )

Description

The TitleCase function returns a string which has the first letter of each word capitalized.

Parameters

Argument Type Definition and Requirements

value

The String having the words capitalized.

Returns

A String which has the first letter of each word capitalized.

Examples

try
{
    Value result = await client.Query(
        Arr(
            TitleCase("JOHN the FiReMan"),
            TitleCase("FIRE And FireMan")
        )
    );

    Console.WriteLine(result);
}
catch (Exception e)
{
    Console.WriteLine($"ERROR: {e.Message}");
}
Arr(StringV(John The Fireman), StringV(Fire And Fireman))
result, err := client.Query(
	f.Arr{
		f.TitleCase("JOHN the FiReMan"),
		f.TitleCase("FIRE And FireMan"),
	})

if err != nil {
	fmt.Fprintln(os.Stderr, err)
} else {
	fmt.Println(result)
}
[John The Fireman Fire And Fireman]
System.out.println(
    client.query(
        Arr(
            TitleCase("JOHN the FiReMan"),
            TitleCase("FIRE And FireMan")
        )
    ).get());
["John The Fireman", "Fire And Fireman"]
client.query(
  [
    q.TitleCase('JOHN the FiReMan'),
    q.TitleCase('FIRE And FireMan'),
  ]
)
.then((ret) => console.log(ret))
.catch((err) => console.error('Error: %s', err))
[ 'John The Fireman', 'Fire And Fireman' ]
result = client.query(
  [
    q.titlecase("JOHN the FiReMan"),
    q.titlecase("FIRE And FireMan"),
  ]
)
print(result)
['John The Fireman', 'Fire And Fireman']
try {
  println(Await.result(
    client.query(
        Arr(
            TitleCase("JOHN the FiReMan"),
            TitleCase("FIRE And FireMan")
        )
    ),
    5.seconds
))} catch {
  case unknown: Throwable => println("Error: " + unknown.getMessage())
}
["John The Fireman", "Fire And Fireman"]

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!