From a6db624aada29e0e11e7e0297d6310413dd1f8f9 Mon Sep 17 00:00:00 2001 From: Xavier Claessens Date: Fri, 28 Oct 2022 13:38:46 -0400 Subject: Implement `in` operator on string --- docs/markdown/snippets/str_in.md | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 docs/markdown/snippets/str_in.md (limited to 'docs/markdown/snippets') 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 +``` -- cgit v1.1