Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for sameWord (0.18 sec)

  1. src/path/filepath/path_plan9.go

    	// If there's a bug here, fix the logic in ./path_unix.go too.
    	for i, e := range elem {
    		if e != "" {
    			return Clean(strings.Join(elem[i:], string(Separator)))
    		}
    	}
    	return ""
    }
    
    func sameWord(a, b string) bool {
    	return a == b
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 26 23:07:50 UTC 2024
    - 926 bytes
    - Viewed (0)
  2. src/path/filepath/path_unix.go

    	// If there's a bug here, fix the logic in ./path_plan9.go too.
    	for i, e := range elem {
    		if e != "" {
    			return Clean(strings.Join(elem[i:], string(Separator)))
    		}
    	}
    	return ""
    }
    
    func sameWord(a, b string) bool {
    	return a == b
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 26 23:07:50 UTC 2024
    - 970 bytes
    - Viewed (0)
  3. src/path/filepath/path_windows.go

    			lastChar = '\\'
    		}
    		if len(e) > 0 {
    			b.WriteString(e)
    			lastChar = e[len(e)-1]
    		}
    	}
    	if b.Len() == 0 {
    		return ""
    	}
    	return Clean(b.String())
    }
    
    func sameWord(a, b string) bool {
    	return strings.EqualFold(a, b)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 26 23:07:50 UTC 2024
    - 3K bytes
    - Viewed (0)
  4. src/path/filepath/path.go

    // Rel calls [Clean] on the result.
    func Rel(basepath, targpath string) (string, error) {
    	baseVol := VolumeName(basepath)
    	targVol := VolumeName(targpath)
    	base := Clean(basepath)
    	targ := Clean(targpath)
    	if sameWord(targ, base) {
    		return ".", nil
    	}
    	base = base[len(baseVol):]
    	targ = targ[len(targVol):]
    	if base == "." {
    		base = ""
    	} else if base == "" && filepathlite.VolumeNameLen(baseVol) > 2 /* isUNC */ {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 15.5K bytes
    - Viewed (0)
Back to top