summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorCharles Brunet <charles.brunet@optelgroup.com>2025-01-09 17:00:09 -0500
committerJussi Pakkanen <jpakkane@gmail.com>2025-01-27 01:27:03 +0200
commit6ee583e119b432fee03f908547729d5da030397e (patch)
tree0846a0ed84b6a0c27ec0610c55ccc1ee8786e6b2 /docs
parentaecff97e186f40575944c923bb9c43a39fe9708b (diff)
downloadmeson-6ee583e119b432fee03f908547729d5da030397e.tar.gz
allow to compare multiple version with version_compare
Diffstat (limited to 'docs')
-rw-r--r--docs/markdown/snippets/multiple_version_compare.md8
-rw-r--r--docs/yaml/elementary/str.yml6
2 files changed, 14 insertions, 0 deletions
diff --git a/docs/markdown/snippets/multiple_version_compare.md b/docs/markdown/snippets/multiple_version_compare.md
new file mode 100644
index 000000000..5e8c7582f
--- /dev/null
+++ b/docs/markdown/snippets/multiple_version_compare.md
@@ -0,0 +1,8 @@
+## `version_compare` now accept multiple compare strings
+
+Is it now possible to compare version against multiple values, to check for
+a range of version for instance.
+
+```meson
+'1.5'.version_compare('>=1', '<2')
+```
diff --git a/docs/yaml/elementary/str.yml b/docs/yaml/elementary/str.yml
index 9d059cc09..44aa74240 100644
--- a/docs/yaml/elementary/str.yml
+++ b/docs/yaml/elementary/str.yml
@@ -306,6 +306,12 @@ methods:
It is best to be unambiguous and specify the full revision level to compare.
+ *Since 1.8.0* multiple versions can be compared:
+
+ ```meson
+ '3.6'.version_compare('>=3', '<4.0') == true
+ ```
+
posargs:
compare_string:
type: str