From 0fb9c5a6839205cc32c2632dd20f723f00dc165b Mon Sep 17 00:00:00 2001 From: Jouke Witteveen Date: Thu, 24 Jul 2025 14:17:55 +0200 Subject: interpreter: Add a slice() method to arrays This can come in handy for instance when a custom target creates both headers and sources. Slicing the output of a `to_list()` call provides convenient access to just the headers or just the sources. --- docs/markdown/snippets/array-slice.md | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 docs/markdown/snippets/array-slice.md (limited to 'docs/markdown/snippets') diff --git a/docs/markdown/snippets/array-slice.md b/docs/markdown/snippets/array-slice.md new file mode 100644 index 000000000..8b503bce9 --- /dev/null +++ b/docs/markdown/snippets/array-slice.md @@ -0,0 +1,3 @@ +## Array `.slice()` method + +Arrays now have a `.slice()` method which allows for subsetting of arrays. -- cgit v1.2.3