• Russ Cox's avatar
    path/filepath: steer people away from HasPrefix · fc268acf
    Russ Cox authored
    The strikes against it are:
    
    1. It does not take path boundaries into account.
    2. It assumes that Windows==case-insensitive file system
    and non-Windows==case-sensitive file system, neither of
    which is always true.
    3. Comparing ToLower against ToLower is not a correct
    implementation of a case-insensitive string comparison.
    4. If it returns true on Windows you still don't know how long
    the matching prefix is in bytes, so you can't compute what
    the suffix is.
    
    R=golang-dev, r, dsymonds, r
    CC=golang-dev
    https://golang.org/cl/5712045
    fc268acf
Name
Last commit
Last update
doc Loading commit data...
include Loading commit data...
lib Loading commit data...
misc Loading commit data...
src Loading commit data...
test Loading commit data...
.hgignore Loading commit data...
.hgtags Loading commit data...
AUTHORS Loading commit data...
CONTRIBUTORS Loading commit data...
LICENSE Loading commit data...
PATENTS Loading commit data...
README Loading commit data...
favicon.ico Loading commit data...
robots.txt Loading commit data...