From a8a54893c09c86e560e6fee9d7972419716dd56d Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 26 Nov 2021 11:04:15 +0200 Subject: Add $size(string), $size(path), and $size(dir_path) functions --- libbuild2/functions-string.cxx | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'libbuild2/functions-string.cxx') diff --git a/libbuild2/functions-string.cxx b/libbuild2/functions-string.cxx index 18a4ed6..4a03a5e 100644 --- a/libbuild2/functions-string.cxx +++ b/libbuild2/functions-string.cxx @@ -83,6 +83,12 @@ namespace build2 // f["size"] += [] (strings v) {return v.size ();}; + // $size() + // + // Return the number of characters (bytes) in the string. + // + f["size"] += [] (string v) {return v.size ();}; + // $sort( [, ]) // // Sort strings in ascending order. -- cgit v1.1