• source navigation  • diff markup  • identifier search  • freetext search  • 

Sources/ucode/tests/custom/03_stdlib/21_uc

  1 The `uc()` function turns each lower case character in the source string
  2 into upper case and returns the resulting copy.
  3 
  4 The input argument is converted to a string in case it is not already a
  5 string value.
  6 
  7 -- Testcase --
  8 {%
  9         printf("%.J\n", [
 10                 uc("This Will Be All Uppercased."),
 11                 uc([ "An", "array", "ABC" ]),
 12                 uc(123),
 13                 uc(false),
 14                 uc()
 15         ]);
 16 %}
 17 -- End --
 18 
 19 -- Expect stdout --
 20 [
 21         "THIS WILL BE ALL UPPERCASED.",
 22         "[ \"AN\", \"ARRAY\", \"ABC\" ]",
 23         "123",
 24         "FALSE",
 25         "NULL"
 26 ]
 27 -- End --

This page was automatically generated by LXR 0.3.1.  •  OpenWrt