[Issue 1858] New: std.string find signature is not string
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Feb 21 04:21:09 PST 2008
http://d.puremagic.com/issues/show_bug.cgi?id=1858
Summary: std.string find signature is not string
Product: D
Version: 2.011
Platform: All
OS/Version: Windows
Status: NEW
Severity: normal
Priority: P2
Component: Phobos
AssignedTo: bugzilla at digitalmars.com
ReportedBy: ddparnell at bigpond.com
In std.string, the find and ifind routines use char[] rather than string in
their parameter signatures. This seems odd because these functions do not
modify the parameter data and most other 'string' functions use string instead
of char[]. As most other routines use string I find that I have to make
exceptions for these ones in my code.
As a workaround, I need to include the functions below in my code...
int find(string a, string b)
{
return std.string.find(a.dup, b.dup);
}
int ifind(string a, string b)
{
return std.string.ifind(a.dup, b.dup);
}
Which involves useless copying.
--
More information about the Digitalmars-d-bugs
mailing list