UpperCase

UpperCase( value )
UpperCase( value )
UpperCase( value )
UpperCase( value )
uppercase( value )
UpperCase( value )

Description

The UpperCase function returns a string which has all lowercase characters in the string replaced by their corresponding uppercase characters.

Parameters

Parameter Type Definition and Requirements

value

The String to be converted to uppercase.

Returns

A String which has all characters from value converted to uppercase.

Examples

The following query executes an array of independent UpperCase operations and returns the results in an array. The result array position matches the execution array position. The first operation takes the string "FiRe" and converts all characters in the string to uppercase. The resultant object "FIRE" is placed in the top position of the result array. The second operation uses the string "FiRe And FireMan" and converts all characters to uppercase. The new uppercase string is placed in the second position of the result array.

try
{
    Value result = await client.Query(
        Arr(
            UpperCase("FiRe"),
            UpperCase("Fire And FireMan")
        )
    );

    Console.WriteLine(result);
}
catch (Exception e)
{
    Console.WriteLine($"ERROR: {e.Message}");
}
Arr(StringV(FIRE), StringV(FIRE AND FIREMAN))
result, err := client.Query(
	f.Arr{
		f.UpperCase("FiRe"),
		f.UpperCase("Fire And FireMan"),
	})

if err != nil {
	fmt.Fprintln(os.Stderr, err)
} else {
	fmt.Println(result)
}
[FIRE FIRE AND FIREMAN]
System.out.println(
    client.query(
        Arr(
            UpperCase("FiRe"),
            UpperCase("Fire And FireMan")
        )
    ).get());
["FIRE", "FIRE AND FIREMAN"]
client.query(
  [
    q.UpperCase('FiRe'),
    q.UpperCase('Fire And FireMan'),
  ]
)
.then((ret) => console.log(ret))
.catch((err) => console.error(
  'Error: [%s] %s: %s',
  err.name,
  err.message,
  err.errors()[0].description,
))
[ 'FIRE', 'FIRE AND FIREMAN' ]
result = client.query(
  [
    q.uppercase("FiRe"),
    q.uppercase("Fire And FireMan")
  ]
)
print(result)
['FIRE', 'FIRE AND FIREMAN']
[
  UpperCase('FiRe'),
  UpperCase('Fire And FireMan'),
]
[ 'FIRE', 'FIRE AND FIREMAN' ]
Query metrics:
  •    bytesIn:  55

  •   bytesOut:  40

  • computeOps:   1

  •    readOps:   0

  •   writeOps:   0

  •  readBytes:   0

  • writeBytes:   0

  •  queryTime: 3ms

  •    retries:   0

Is this article helpful? 

Tell Fauna how the article can be improved:
Visit Fauna's forums or email docs@fauna.com

Thank you for your feedback!