- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for Na (0.17 sec)
-
src/bytes/bytes.go
if n <= 0 || n > len(s) { n = len(s) } a := make([][]byte, n) var size int na := 0 for len(s) > 0 { if na+1 >= n { a[na] = s na++ break } _, size = utf8.DecodeRune(s) a[na] = s[0:size:size] s = s[size:] na++ } return a[0:na] } // Count counts the number of non-overlapping instances of sep in s.
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) -
src/bytes/example_test.go
fmt.Println(bytes.NewReader([]byte("Hi!")).Len()) fmt.Println(bytes.NewReader([]byte("こんにちは!")).Len()) // Output: // 3 // 16 } func ExampleRepeat() { fmt.Printf("ba%s", bytes.Repeat([]byte("na"), 2)) // Output: banana } func ExampleReplace() { fmt.Printf("%s\n", bytes.Replace([]byte("oink oink oink"), []byte("k"), []byte("ky"), 2))
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Mon Mar 04 15:54:40 GMT 2024 - 15K bytes - Viewed (1)