Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PORT] [Expression] make indexOf/lastIndexOf function support list #1796

Closed
tomlm opened this issue Feb 26, 2020 · 0 comments · Fixed by #1797
Closed

[PORT] [Expression] make indexOf/lastIndexOf function support list #1796

tomlm opened this issue Feb 26, 2020 · 0 comments · Fixed by #1797
Assignees
Labels
R8 Release 8 - March 16th, 2020
Milestone

Comments

@tomlm
Copy link
Contributor

tomlm commented Feb 26, 2020

Port this change from botbuilder-dotnet/master branch:
microsoft/botbuilder-dotnet#3444

Orignially, indexOf and lastIndexOf just support string implement, for example:

indexOf('abc', 'b') => 2
indexOf('abc', 'd') => -1
lastIndexOf('abcab', 'ab') => 3

Current, the first parameter support list data type. So, the expression below is valid

indexOf(createArray('abc', 'def', 'ghi'), 'def')  => 1
indexOf(json('[\"a\", \"b\"]'), 'a') => 0
lastIndexOf(json('[\"a\", \"b\", \"a\"]'), 'a') => 2
lastIndexOf(createArray('abc', 'def', 'ghi', 'def'), 'def') => 3

Changed projects

  • AdaptiveExpressions
  • AdaptiveExpressions.Tests
@Danieladu Danieladu added lg R8 Release 8 - March 16th, 2020 labels Feb 27, 2020
@Danieladu Danieladu self-assigned this Feb 28, 2020
@munozemilio munozemilio added this to the R8 milestone Jul 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
R8 Release 8 - March 16th, 2020
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants