www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - std.string.ifind(char[],char[]): unexpected finds

reply Thomas Kuehne <thomas-dloop kuehne.thisisspam.cn> writes:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

# import std.string;
#
# int main(){
#        assert(find("structures","cvs://")==-1);
#        assert(ifind("structures","cvs://")==-1);
#        return 0;
# }

The second assert fails as does the out-contract in phobos.

Thomas


-----BEGIN PGP SIGNATURE-----

iD8DBQFCUTyw3w+/yD4P9tIRAjwQAJ0f6oBgQjgo9AVGkiCxACvYpbWqtQCgsbX5
tPcBE5HouzCFuHBxyUviGis=
=jkK9
-----END PGP SIGNATURE-----
Apr 04 2005
parent reply Derek Parnell <derek psych.ward> writes:
On Mon, 4 Apr 2005 15:10:08 +0200, Thomas Kuehne wrote:

 # import std.string;
 #
 # int main(){
 #        assert(find("structures","cvs://")==-1);
 #        assert(ifind("structures","cvs://")==-1);
 #        return 0;
 # }
 
 The second assert fails as does the out-contract in phobos.

The 'ifind' function has been broken for ages now. I've given up waiting for it to be fixed, and I just use a slow workaround (find(tolower(x), tolower(y)) - nasty stuff really. -- Derek Parnell Melbourne, Australia 4/04/2005 11:17:59 PM
Apr 04 2005
parent reply "Ben Hinkle" <bhinkle mathworks.com> writes:
"Derek Parnell" <derek psych.ward> wrote in message 
news:12bxvt4xl9wtk.bkkmf7xe4l1c$.dlg 40tude.net...
 On Mon, 4 Apr 2005 15:10:08 +0200, Thomas Kuehne wrote:

 # import std.string;
 #
 # int main(){
 #        assert(find("structures","cvs://")==-1);
 #        assert(ifind("structures","cvs://")==-1);
 #        return 0;
 # }

 The second assert fails as does the out-contract in phobos.

The 'ifind' function has been broken for ages now. I've given up waiting for it to be fixed, and I just use a slow workaround (find(tolower(x), tolower(y)) - nasty stuff really.

Has someone sent a fix to Walter? Has anyone debugged the problem? Sometimes Walter loses track of fixes and he might have lost track of this one, assuming someone did send him a patch.
Apr 04 2005
parent reply =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= <afb algonet.se> writes:
Ben Hinkle wrote:

 Has someone sent a fix to Walter? Has anyone debugged the problem? Sometimes 
 Walter loses track of fixes and he might have lost track of this one, 
 assuming someone did send him a patch. 

Some people (me included) naively thought this newsgroup was the place. D still needs a bug database. (and then some, like Bug Parade or PEP ?) The only problem with Walter is that there is too few of him... :-) --anders
Apr 04 2005
parent "Ben Hinkle" <bhinkle mathworks.com> writes:
"Anders F Björklund" <afb algonet.se> wrote in message 
news:d2rj75$285k$1 digitaldaemon.com...
 Ben Hinkle wrote:

 Has someone sent a fix to Walter? Has anyone debugged the problem? 
 Sometimes Walter loses track of fixes and he might have lost track of 
 this one, assuming someone did send him a patch.

Some people (me included) naively thought this newsgroup was the place.

That's why I tried to get some process clarification about how to communicate phobos bug fixes to Walter. Can you repost your fixes and/or email them to Walter? I think things go best when you 1) make it easy for him and include doc updates if appropriate 2) send him uncontroversial content or send a link to a newsgroup discussion
 D still needs a bug database. (and then some, like Bug Parade or PEP ?)

The wiki for phobos can be a quick-n-dirty bug database. At least that's how I use it for std.stream. http://www.prowiki.org/wiki4d/wiki.cgi?Phobos I notice there isn't much else there bug-wise.
 The only problem with Walter is that there is too few of him... :-)

yup.
Apr 04 2005