aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/functions-regex.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2024-05-20 09:34:16 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2024-05-20 09:34:16 +0200
commit2fc53c801eb551154f0a2aa96522cf3182a65b7a (patch)
treeed48460199846d853ac4be7deecc7f16bb478976 /libbuild2/functions-regex.cxx
parent4543814cc2951f9d8ccd914253be2954acb9ba41 (diff)
Add $string.contains(), $string.starts_with(), $string.ends_with()
Also fix bug in $string.replace().
Diffstat (limited to 'libbuild2/functions-regex.cxx')
-rw-r--r--libbuild2/functions-regex.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/libbuild2/functions-regex.cxx b/libbuild2/functions-regex.cxx
index cf3ffd0..c46f6f5 100644
--- a/libbuild2/functions-regex.cxx
+++ b/libbuild2/functions-regex.cxx
@@ -688,6 +688,9 @@ namespace build2
// If both `return_match` and `return_subs` flags are specified then the
// sub-string that matches the whole regular expression comes first.
//
+ // See also `$string.contains()`, `$string.starts_with()`,
+ // `$string.ends_with()`.
+ //
f[".search"] += [](value v, string re, optional<names> flags)
{
return search (move (v), re, move (flags));