- Sort Score
- Result 10 results
- Languages All
Results 1 - 4 of 4 for TrimLeft (0.1 sec)
-
src/bytes/bytes_test.go
{"Trim", []byte{'a', 'b'}, "ab", nil}, {"Trim", []byte("☺"), "☺", nil}, {"TrimLeft", nil, "", nil}, {"TrimLeft", []byte{}, "", nil}, {"TrimLeft", []byte{'a'}, "a", nil}, {"TrimLeft", []byte{'a', 'a'}, "a", nil}, {"TrimLeft", []byte{'a'}, "ab", nil}, {"TrimLeft", []byte{'a', 'b'}, "ab", nil}, {"TrimLeft", []byte("☺"), "☺", nil}, {"TrimRight", nil, "", nil}, {"TrimRight", []byte{}, "", []byte{}},
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Mon Aug 19 19:09:04 UTC 2024 - 61.2K bytes - Viewed (0) -
src/cmd/asm/internal/asm/endtoend_test.go
} func isHexes(s string) bool { if s == "" { return false } if s == "empty" { return true } for _, f := range strings.Split(s, " or ") { if f == "" || len(f)%2 != 0 || strings.TrimLeft(f, "0123456789abcdef") != "" { return false } } return true } // It would be nice if the error messages always began with // the standard file:line: prefix,
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Thu Dec 07 18:42:59 UTC 2023 - 11.6K bytes - Viewed (0) -
src/bytes/example_test.go
// Output: // -gopher! // "go-gopher!" // go-gopher // go-gopher! } func ExampleTrimLeft() { fmt.Print(string(bytes.TrimLeft([]byte("453gopher8257"), "0123456789"))) // Output: // gopher8257 } func ExampleTrimLeftFunc() { fmt.Println(string(bytes.TrimLeftFunc([]byte("go-gopher"), unicode.IsLetter)))
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Wed Aug 07 17:22:36 UTC 2024 - 14.9K bytes - Viewed (0) -
src/bytes/bytes.go
return trimLeftASCII(trimRightASCII(s, &as), &as) } return trimLeftUnicode(trimRightUnicode(s, cutset), cutset) } // TrimLeft returns a subslice of s by slicing off all leading // UTF-8-encoded code points contained in cutset. func TrimLeft(s []byte, cutset string) []byte { if len(s) == 0 { // This is what we've historically done. return nil } if cutset == "" { return s
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Tue Sep 03 20:55:15 UTC 2024 - 35.6K bytes - Viewed (0)