- Sort Score
- Result 10 results
- Languages All
Results 1 - 5 of 5 for ToValidUTF8 (0.15 sec)
-
src/strings/example_test.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Oct 09 22:05:38 UTC 2023 - 10.7K bytes - Viewed (0) -
src/strings/strings_test.go
{"\xFC\x80\x80\x80\x80\xAF", "\uFFFD", "\uFFFD"}, } func TestToValidUTF8(t *testing.T) { for _, tc := range toValidUTF8Tests { got := ToValidUTF8(tc.in, tc.repl) if got != tc.out { t.Errorf("ToValidUTF8(%q, %q) = %q; want %q", tc.in, tc.repl, got, tc.out) } } } func BenchmarkToUpper(b *testing.B) { for _, tc := range upperTests { b.Run(tc.in, func(b *testing.B) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 03 12:58:37 UTC 2024 - 53K bytes - Viewed (0) -
src/strings/strings.go
func ToTitleSpecial(c unicode.SpecialCase, s string) string { return Map(c.ToTitle, s) } // ToValidUTF8 returns a copy of the string s with each run of invalid UTF-8 byte sequences // replaced by the replacement string, which may be empty. func ToValidUTF8(s, replacement string) string { var b Builder for i, c := range s { if c != utf8.RuneError { continue }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 03 16:48:16 UTC 2024 - 31.2K bytes - Viewed (0) -
src/bytes/bytes_test.go
{"\xFC\x80\x80\x80\x80\xAF", "\uFFFD", "\uFFFD"}, } func TestToValidUTF8(t *testing.T) { for _, tc := range toValidUTF8Tests { got := ToValidUTF8([]byte(tc.in), []byte(tc.repl)) if !Equal(got, []byte(tc.out)) { t.Errorf("ToValidUTF8(%q, %q) = %q; want %q", tc.in, tc.repl, got, tc.out) } } } func TestTrimSpace(t *testing.T) { runStringTests(t, TrimSpace, "TrimSpace", trimSpaceTests) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 03 12:58:37 UTC 2024 - 56.5K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/tools/internal/stdlib/manifest.go
{"Title", Func, 0}, {"ToLower", Func, 0}, {"ToLowerSpecial", Func, 0}, {"ToTitle", Func, 0}, {"ToTitleSpecial", Func, 0}, {"ToUpper", Func, 0}, {"ToUpperSpecial", Func, 0}, {"ToValidUTF8", Func, 13}, {"Trim", Func, 0}, {"TrimFunc", Func, 0}, {"TrimLeft", Func, 0}, {"TrimLeftFunc", Func, 0}, {"TrimPrefix", Func, 1}, {"TrimRight", Func, 0}, {"TrimRightFunc", Func, 0},
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 02 02:20:05 UTC 2024 - 534.2K bytes - Viewed (0)