MCPcopy Index your code
hub / github.com/rclone/rclone / encodeWithReplacement

Function encodeWithReplacement

lib/transform/cmap.go:57–65  ·  view source on GitHub ↗
(s string, cmap *charmap.Charmap)

Source from the content-addressed store, hash-verified

55}
56
57func encodeWithReplacement(s string, cmap *charmap.Charmap) string {
58 return strings.Map(func(r rune) rune {
59 b, ok := cmap.EncodeRune(r)
60 if !ok {
61 return '_'
62 }
63 return cmap.DecodeByte(b)
64 }, s)
65}
66
67func toASCII(s string) string {
68 return strings.Map(func(r rune) rune {

Callers 1

transformPathSegmentFunction · 0.85

Calls 1

MapMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…