November 26, 2011 [Issue 7009] New: countChars, removeChars | ||||
---|---|---|---|---|
| ||||
http://d.puremagic.com/issues/show_bug.cgi?id=7009 Summary: countChars, removeChars Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: enhancement Priority: P2 Component: DMD AssignedTo: nobody@puremagic.com ReportedBy: bearophile_hugs@eml.cc --- Comment #0 from bearophile_hugs@eml.cc 2011-11-25 16:34:03 PST --- For uniformity with the other string functions I think std.string.countchars, std.string.removechars need a capital letter in the middle: import std.string: countChars, removeChars; void main() { string s = "hello"; assert(s.countChars("l") == 2); assert(s.removeChars("l") == "heo"); } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
November 28, 2011 [Issue 7009] countChars, removeChars | ||||
---|---|---|---|---|
| ||||
Posted in reply to bearophile_hugs@eml.cc | http://d.puremagic.com/issues/show_bug.cgi?id=7009 Jonathan M Davis <jmdavisProg@gmx.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jmdavisProg@gmx.com --- Comment #1 from Jonathan M Davis <jmdavisProg@gmx.com> 2011-11-27 20:18:18 PST --- None of the functions in std.string which take a pattern are currently camelcased, because they weren't created that way initially. They haven't been changed, because there was some discussion about replacing them with versions which take RegEx instead of a pattern. If that's done, then the new functions would be properly camelcased, and the current ones would be deprecated. But I didn't want to go and rename those functions only to have to deprecate them later. The question is whether we do in fact want to change them to use RegEx, and if so, who's going to do that work. If not, we can look at renaming them. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
Copyright © 1999-2021 by the D Language Foundation