aboutsummaryrefslogtreecommitdiff
path: root/docs/markdown/snippets
diff options
context:
space:
mode:
Diffstat (limited to 'docs/markdown/snippets')
-rw-r--r--docs/markdown/snippets/str_in.md11
1 files changed, 11 insertions, 0 deletions
diff --git a/docs/markdown/snippets/str_in.md b/docs/markdown/snippets/str_in.md
new file mode 100644
index 0000000..abcb8bd
--- /dev/null
+++ b/docs/markdown/snippets/str_in.md
@@ -0,0 +1,11 @@
+## `in` operator for strings
+
+`in` and `not in` operators now works on strings, in addition to arrays and
+dictionaries.
+
+```
+fs = import('fs')
+if 'something' in fs.read('somefile')
+ # True
+endif
+```