☐ cool new feature
☐ could help many users!
☐ removes something that feels like a „bug“
☑ nice to have
☐ nobody needs it
What inspired this wish list request?
To check if a string is part of a larger string - and to get the exact position - one can use contains().
To check if an item is in a list - and to get the exact position - one can use contains().
To check if an expression shows up in a long expression
... there is no function in JMP/JSL. Neither is there a function to get the position.
This is surprising. Because there is this cool
Substitute(Expr(...), Exr(replace), Expr(with))
which needs to find out if an expression can be found in a main expression - and where it is.
What is the improvement you would like to see?
Please provide a JSL function to check if an expression shows up in a long expression - and to get the position(s):
e.g. if it's the 5. argument of the 3rd argument of the 1st argument of the main expression, the function could return {{1,3,5}}.
If it finds the expression at several places, it could return all different matches.
If it finds the expression - but cannot locate it exactly [because it's just part of an argument], it could return 1.
And if the expression is missing, it could return missing.
Why is this idea important?
Contains(Expr(...), Expr(search)) will facilitate JSL scripting.
It's slightly related to another new feature, 🙏 Expression Indexing: read and write access
other wishes from