summaryrefslogtreecommitdiffhomepage
path: root/tests/custom/03_stdlib/21_uc
blob: a5aeed3d6a1b002b9bd29fa194f2d85ad89421ab (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
The `uc()` function turns each lower case character in the source string
into upper case and returns the resulting copy.

The input argument is converted to a string in case it is not already a
string value.

-- Testcase --
{%
	printf("%.J\n", [
		uc("This Will Be All Uppercased."),
		uc([ "An", "array", "ABC" ]),
		uc(123),
		uc(false),
		uc()
	]);
%}
-- End --

-- Expect stdout --
[
	"THIS WILL BE ALL UPPERCASED.",
	"[ \"AN\", \"ARRAY\", \"ABC\" ]",
	"123",
	"FALSE",
	"NULL"
]
-- End --