MCPcopy Create free account
hub / github.com/microsoft/typescript-go / RemoveTrailingDirectorySeparator

Function RemoveTrailingDirectorySeparator

internal/tspath/path.go:697–702  ·  view source on GitHub ↗
(path string)

Source from the content-addressed store, hash-verified

695}
696
697func RemoveTrailingDirectorySeparator(path string) string {
698 if HasTrailingDirectorySeparator(path) {
699 return path[:len(path)-1]
700 }
701 return path
702}
703
704func (p Path) RemoveTrailingDirectorySeparator() Path {
705 return Path(RemoveTrailingDirectorySeparator(string(p)))

Callers 15

getRecursiveGlobPatternFunction · 0.92
FromMapWithClockFunction · 0.92
SplitPathFunction · 0.92
FromFunction · 0.92
getIncludeBasePathFunction · 0.92
compileGlobPatternFunction · 0.92

Calls 2

lenFunction · 0.85

Tested by

no test coverage detected