API Reference | developer.brewmp.com API Reference | developer.brewmp.com

Developer

API Reference

STD_CLEANPATH()

Brew Release
Brew MP 1.0.2
See Also
None
Description
The std_cleanpath() removes double slashes, ".", and ".." from slash-delimited paths,. It operates in-place.
Interface
Prototype
  •    char *std_cleanpath(char *pszPath);
    
Return
  • pszPath
Side Effect
  • None
Comments
Passing an "fs:/" path to this function may produce undesirable results. This function assumes '/' is the root. Examples: pszPath std_cleanpath() "", "", "/", "/", // here"s, mostly alone "./", "/", "/.", "/", "/./", "/", // "up"s, mostly alone "..", "", "/..", "/", "../", "/", "/../", "/", // fun with x "x/.", "x", "x/./", "x/", "x/..", "", "/x/..", "/", "x/../", "/", "/x/../", "/", "/x/../..", "/", "x/../..", "", "x/../../", "/", "x/./../", "/", "x/././", "x/", "x/.././", "/", "x/../.", "", "x/./..", "", "../x", "/x", "../../x", "/x", "/../x", "/x", "./../x", "/x", // double slashes "//", "/", "///", "/", "////", "/", "x//x", "x/x",