[Issue 4849] Remove str.string.abbrev()
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Sep 11 07:58:31 PDT 2010
http://d.puremagic.com/issues/show_bug.cgi?id=4849
--- Comment #3 from Andrej Mitrovic <andrej.mitrovich at gmail.com> 2010-09-11 07:58:00 PDT ---
I think this might need renaming, but also I would want this to have additional
functionality. If some characters are capitalized, you should be able to
abbreviate by using only those chars, e.g.:
static string[] list = [ "FoodAndDrinks", "FoodAndCocacola" ];
auto abbrevs = std.string.abbrev(list);
foreach (key, value; abbrevs)
{
writefln("%s => %s", key, value);
}
This should print out, among other things:
...
FAD => FoodAndDrinks
FooAD => FoodAndDrinks
FAC => FoodAndCocacola
Then it would be much more usable as an autocomplete feature. But I don't know
if this belongs in Phobos.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list