- Sort Score
- Result 10 results
- Languages All
Results 1 - 4 of 4 for TrimRight (0.27 sec)
-
src/bytes/bytes_test.go
{"TrimLeft", []byte{'a', 'b'}, "ab", nil}, {"TrimLeft", []byte("☺"), "☺", nil}, {"TrimRight", nil, "", nil}, {"TrimRight", []byte{}, "", []byte{}}, {"TrimRight", []byte{'a'}, "a", []byte{}}, {"TrimRight", []byte{'a', 'a'}, "a", []byte{}}, {"TrimRight", []byte{'a'}, "ab", []byte{}}, {"TrimRight", []byte{'a', 'b'}, "ab", []byte{}}, {"TrimRight", []byte("☺"), "☺", []byte{}}, {"TrimPrefix", nil, "", nil},
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Wed Jan 24 16:07:25 GMT 2024 - 56.2K bytes - Viewed (0) -
src/bytes/example_test.go
b = bytes.TrimSuffix(b, []byte("gopher")) b = append(b, bytes.TrimSuffix([]byte("world!"), []byte("x!"))...) os.Stdout.Write(b) // Output: Hello, world! } func ExampleTrimRight() { fmt.Print(string(bytes.TrimRight([]byte("453gopher8257"), "0123456789"))) // Output: // 453gopher } func ExampleTrimRightFunc() { fmt.Println(string(bytes.TrimRightFunc([]byte("go-gopher"), unicode.IsLetter)))
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Mon Mar 04 15:54:40 GMT 2024 - 15K bytes - Viewed (1) -
src/archive/tar/reader.go
// nextToken gets the next token delimited by a newline. This assumes that // at least one newline exists in the buffer. nextToken := func() string { cntNewline-- tok, _ := buf.ReadString('\n') return strings.TrimRight(tok, "\n") } // Parse for the number of entries. // Use integer overflow resistant math to check this. if err := feedTokens(1); err != nil { return nil, err }
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Fri Mar 08 01:59:14 GMT 2024 - 26.8K bytes - Viewed (0) -
src/bytes/bytes.go
} s = s[n:] } if len(s) == 0 { // This is what we've historically done. return nil } return s } // TrimRight returns a subslice of s by slicing off all trailing // UTF-8-encoded code points that are contained in cutset. func TrimRight(s []byte, cutset string) []byte { if len(s) == 0 || cutset == "" { return s } if len(cutset) == 1 && cutset[0] < utf8.RuneSelf {
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Mon Feb 19 19:51:15 GMT 2024 - 33.8K bytes - Viewed (0)