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

Add String.removeWhere #23

Open
ThinkDigitalSoftware opened this issue Dec 15, 2019 · 1 comment
Open

Add String.removeWhere #23

ThinkDigitalSoftware opened this issue Dec 15, 2019 · 1 comment

Comments

@ThinkDigitalSoftware
Copy link
Contributor

Same as List.removeWhere but for characters and patterns. This will basically wrap the replaceAll call and default the second parameter to an empty string

@komape
Copy link
Contributor

komape commented Mar 19, 2021

With a list you have a list of items. The function given to the method applies it to every item. The problem with a string is the definition of an item in this context. The first definition that comes to my mind is that one each character of a string is an item. For example:

// this would result as: hell wrld
'hello world'.removeWhere((c) => c == 'o');

Do you mean that? Do you have an example or more specified definition?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants