toLower
Joel
joelcnz at gmail.com
Tue Aug 15 16:47:36 UTC 2023
How come toLower works in the sort quotes, but not in the map?
```d
void main() {
import std;
"EzraTezla"
.to!(char[])
.byCodeUnit
.sort!"a.toLower<b.toLower"
.map!(c => c.toLower)
.writeln;
}
```
onlineapp.d(60): Error: `toLower` matches conflicting symbols:
/dlang/dmd/linux/bin64/../../src/phobos/std/uni/package.d(9819):
function `std.uni.toLower`
/dlang/dmd/linux/bin64/../../src/phobos/std/ascii.d(637):
function `std.ascii.toLower!char.toLower`
/dlang/dmd/linux/bin64/../../src/phobos/std/algorithm/iteration.d(479): instantiated from here: `MapResult!(__lambda4, SortedRange!(ByCodeUnitImpl, "a.toLower>b.toLower", SortedRangeOptions.assumeSorted))`
onlineapp.d(60): instantiated from here:
`map!(SortedRange!(ByCodeUnitImpl, "a.toLower>b.toLower",
SortedRangeOptions.assumeSorted))`
More information about the Digitalmars-d-learn
mailing list