diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2023-01-17 13:10:40 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2023-01-17 13:11:22 +0300 |
commit | 33f5e4665f961de406802f13420c66598c7b32e1 (patch) | |
tree | 9a8e1f609cc01a2fdf41615190dc07f2145b1e23 /libbpkg/manifest.hxx | |
parent | d66e8f5e02f77bd51e3dc545d08c5fcbbf6e4e97 (diff) |
Add distribution_name_value::distribution()
Diffstat (limited to 'libbpkg/manifest.hxx')
-rw-r--r-- | libbpkg/manifest.hxx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libbpkg/manifest.hxx b/libbpkg/manifest.hxx index 757fc92..055cb7e 100644 --- a/libbpkg/manifest.hxx +++ b/libbpkg/manifest.hxx @@ -1156,6 +1156,12 @@ namespace bpkg distribution_name_value (std::string n, std::string v) : name (std::move (n)), value (std::move (v)) {} + + // Return the name's <distribution> component if the name has the + // specified suffix, which is assumed to be valid (-name, etc). + // + butl::optional<std::string> + distribution (const std::string& suffix) const; }; class LIBBPKG_EXPORT package_manifest |