summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
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