aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/functions-string.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'libbuild2/functions-string.cxx')
-rw-r--r--libbuild2/functions-string.cxx22
1 files changed, 22 insertions, 0 deletions
diff --git a/libbuild2/functions-string.cxx b/libbuild2/functions-string.cxx
index f458a59..c5cb216 100644
--- a/libbuild2/functions-string.cxx
+++ b/libbuild2/functions-string.cxx
@@ -55,6 +55,28 @@ namespace build2
return names {name (trim (convert<string> (move (s))))};
};
+ // Convert ASCII strings into lower/upper case.
+ //
+ f["lcase"] = [](string s)
+ {
+ return lcase (move (s));
+ };
+
+ f[".lcase"] = [](names s)
+ {
+ return names {name (lcase (convert<string> (move (s))))};
+ };
+
+ f["ucase"] = [](string s)
+ {
+ return ucase (move (s));
+ };
+
+ f[".ucase"] = [](names s)
+ {
+ return names {name (ucase (convert<string> (move (s))))};
+ };
+
// String-specific overloads from builtins.
//
function_family b (m, "builtin");