-
Notifications
You must be signed in to change notification settings - Fork 426
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
string.contains() #11439
Comments
Any updates if this feature is to be implemented or not? If yes, I would like to work on this. |
@RajShekhar7 - it is not implemented, but this requires design discussion before pursuing implementation. Check out contributor info to understand that process better. |
@ben-albrecht - I've read the Contributor Info, but help me understand, should I open a new issue for design discussions in this case if I want to implement it? |
@RajShekhar7 I think you can give your design inputs on this thread itself. Thanks ! |
This thread is fine. The big thing is that we need other core developers to agree to the design before pursuing it. |
@ben-albrecht, I would like to work on this.
I want to discuss how to implement this as I have 1 or 2 approaches in mind, if all others agree. |
I think the implementation for this is fairly straightforward, e.g. proc string.contains(s: string) {
return this.count(s) > 0;
} The big thing is that we need other core developers to agree to the design before pursuing it. To move this forward, someone should make a post to chapel developers discourse requesting input, as instructed here: https://github.com/chapel-lang/chapel/blob/master/doc/rst/developer/bestPractices/ContributorInfo.rst#design |
I find the idea very appealing. And in general, find the behavior as Ben sketched out above to be the right behavior. I would like to know/discuss:
|
@e-kayrakli I did a bit of google search and found out that.
|
Closing since a more recent feature request has captured the info from here and has additional info with a future checked in: #19119 |
Chapel domains support a
.contains()
method for querying if a value is in the domain (as of #5041).Should Chapel strings be consistent with the domain interface and support
string.contains()
for querying if a substring is in the string?The
string
type currently supportsstring.find()
andstring.count()
, however these are slightly more verbose to use in a conditional thanstring.contains()
:The text was updated successfully, but these errors were encountered: