Ranges of char and wchar
Walter Bright via Digitalmars-d
digitalmars-d at puremagic.com
Thu May 8 16:56:37 PDT 2014
Classification of functions in http://dlang.org/phobos/std_path.html:
1. Functions that allocate GC memory and return an array:
dirName, setExtension, defaultExtension, buildPath, buildNormalizedPath,
absolutePath, relativePath, expandTilde
These are prime candidates to be converted into algorithms.
2. Functions that return a slice of their input arrays:
baseName, rootName, driveName, stripDrive, extension,
Should be enhanced to accept RandomAccessRange and produce RandomAccessRange
3. Functions that return a range:
pathSplitter
Enhance to accept RandomAccessRange
4. Functions that take an array and compute a value:
isRooted, isAbsolute, filenameCmp, globMatch, isValidPath
These are reducers, and should be enhanced to accept input ranges.
More information about the Digitalmars-d
mailing list