http://d.puremagic.com/issues/show_bug.cgi?id=4849



--- Comment #3 from Andrej Mitrovic <andrej.mitrov...@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: -------

Reply via email to