Skip to content

Expander shortcut for string.LastIndexOfAny()#6963

Merged
ladipro merged 1 commit into
mainfrom
dev/kirillo/lastIndexOfAny
Oct 19, 2021
Merged

Expander shortcut for string.LastIndexOfAny()#6963
ladipro merged 1 commit into
mainfrom
dev/kirillo/lastIndexOfAny

Conversation

@KirillOsenkov
Copy link
Copy Markdown
Member

Allowing a string as a char array to call string.LastIndexOfAny(char[]) seems like a sensible thing to do.

However the other two overloads expecting a
startIndex and count seem to be too exotic to support.

I'm honestly not even sure how to pass a char array to a function in MSBuild, and I saw people using strings, so I guess makes sense to support that?

Allowing a string as a char array to call string.LastIndexOfAny(char[]) seems like a sensible thing to do.

However the other two overloads expecting a
startIndex and count seem to be too exotic to support.
Copy link
Copy Markdown
Member

@ericstj ericstj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix!

Copy link
Copy Markdown
Member

@ladipro ladipro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm honestly not even sure how to pass a char array to a function in MSBuild, and I saw people using strings, so I guess makes sense to support that?

IndexOfAny is already supported, implemented exactly the way you implemented LastIndexOfAny so I'd say this makes perfect sense. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-when-branch-open PRs that are approved, except that there is a problem that means we are not merging stuff right now.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants