MCPcopy Index your code
hub / github.com/GoEdgeLab/EdgeNode / TestToValidUTF8string

Function TestToValidUTF8string

internal/utils/string_test.go:70–80  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

68}
69
70func TestToValidUTF8string(t *testing.T) {
71 for _, s := range []string{
72 "https://goedge.cn/",
73 "提升mysql数据表写入速度",
74 "😆",
75 string([]byte{'a', 'b', 130, 131, 132, 133, 134, 'c'}),
76 } {
77 var u = utils.ToValidUTF8string(s)
78 t.Log(s, "["+types.String(len(s))+"]", "=>", u, "["+types.String(len(u))+"]")
79 }
80}

Callers

nothing calls this directly

Calls 3

ToValidUTF8stringFunction · 0.92
LogMethod · 0.80
StringMethod · 0.45

Tested by

no test coverage detected