- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 19 for sep (0.01 sec)
-
src/bytes/iter.go
} s = s[i+len(sep):] } yield(s[:len(s):len(s)]) } } // SplitSeq returns an iterator over all substrings of s separated by sep. // The iterator yields the same strings that would be returned by Split(s, sep), // but without constructing the slice. // It returns a single-use iterator. func SplitSeq(s, sep []byte) iter.Seq[[]byte] { return splitSeq(s, sep, 0) }
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Wed Aug 14 18:23:13 UTC 2024 - 3.7K bytes - Viewed (0) -
src/bytes/bytes_test.go
} if tt.n < 0 { b := sliceOfString(Split([]byte(tt.s), []byte(tt.sep))) if !slices.Equal(result, b) { t.Errorf("Split disagrees withSplitN(%q, %q, %d) = %v; want %v", tt.s, tt.sep, tt.n, b, a) } } if len(a) > 0 { in, out := a[0], s if cap(in) == cap(out) && &in[:1][0] == &out[:1][0] { t.Errorf("Join(%#v, %q) didn't copy", a, tt.sep) } } }
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/bytes/bytes.go
} // Count counts the number of non-overlapping instances of sep in s. // If sep is an empty slice, Count returns 1 + the number of UTF-8-encoded code points in s. func Count(s, sep []byte) int { // special case if len(sep) == 0 { return utf8.RuneCount(s) + 1 } if len(sep) == 1 { return bytealg.Count(s, sep[0]) } n := 0 for { i := Index(s, sep) if i == -1 { return n } n++
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Tue Sep 03 20:55:15 UTC 2024 - 35.6K bytes - Viewed (0) -
doc/next/6-stdlib/99-minor/strings/61901.md
- [Lines] returns an iterator over the newline-terminated lines in the string s. - [SplitSeq] returns an iterator over all substrings of s separated by sep. - [SplitAfterSeq] returns an iterator over substrings of s split after each instance of sep. - [FieldsSeq] returns an iterator over substrings of s split around runs of whitespace characters, as defined by unicode.IsSpace. - [FieldsFuncSeq] returns an iterator
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Wed Aug 14 18:23:13 UTC 2024 - 580 bytes - Viewed (0) -
doc/next/6-stdlib/99-minor/bytes/61901.md
- [Lines] returns an iterator over the newline-terminated lines in the byte slice s. - [SplitSeq] returns an iterator over all substrings of s separated by sep. - [SplitAfterSeq] returns an iterator over substrings of s split after each instance of sep. - [FieldsSeq] returns an iterator over substrings of s split around runs of whitespace characters, as defined by unicode.IsSpace. - [FieldsFuncSeq] returns an iterator
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Wed Aug 14 18:23:13 UTC 2024 - 582 bytes - Viewed (0) -
src/bytes/example_test.go
func ExampleCutPrefix() { show := func(s, sep string) { after, found := bytes.CutPrefix([]byte(s), []byte(sep)) fmt.Printf("CutPrefix(%q, %q) = %q, %v\n", s, sep, after, found) } show("Gopher", "Go") show("Gopher", "ph") // Output: // CutPrefix("Gopher", "Go") = "pher", true // CutPrefix("Gopher", "ph") = "Gopher", false } func ExampleCutSuffix() { show := func(s, sep string) {
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Wed Aug 07 17:22:36 UTC 2024 - 14.9K bytes - Viewed (0) -
schema/utils.go
var embeddedCacheKey = "embedded_cache_store" func ParseTagSetting(str string, sep string) map[string]string { settings := map[string]string{} names := strings.Split(str, sep) for i := 0; i < len(names); i++ { j := i if len(names[j]) > 0 { for { if names[j][len(names[j])-1] == '\\' { i++ names[j] = names[j][0:len(names[j])-1] + sep + names[i] names[i] = "" } else { break } }
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Sat Aug 19 13:35:14 UTC 2023 - 5.5K bytes - Viewed (0) -
src/test/java/org/codelibs/core/convert/DateConversionUtilTest.java
} /** * @throws Exception */ @Test public void testToDate_SpecificLocale() throws Exception { final Date date = toDate("SEP 7, 2010", Locale.US); assertThat(new SimpleDateFormat("yyyy/MM/dd").format(date), is("2010/09/07")); } /** * @throws Exception */ @Test
Registered: Fri Nov 01 20:58:10 UTC 2024 - Last Modified: Thu Mar 07 01:59:08 UTC 2024 - 9.4K bytes - Viewed (0) -
istioctl/pkg/writer/table/writer.go
output := c.getTableOutput(c.rows) if len(output) == 0 { return } sep := getMaxWidths(output) for _, row := range output { for i, col := range row { _, _ = fmt.Fprint(c.writer, col.String()) if i == len(row)-1 { _, _ = fmt.Fprint(c.writer, "\n") } else { padAmount := sep[i] - utf8.RuneCount([]byte(col.Value)) + 2 _, _ = fmt.Fprint(c.writer, strings.Repeat(" ", padAmount))
Registered: Wed Nov 06 22:53:10 UTC 2024 - Last Modified: Wed Nov 06 09:43:25 UTC 2024 - 2.7K bytes - Viewed (0) -
src/test/java/org/codelibs/core/convert/TimestampConversionUtilTest.java
// } /** * @throws Exception */ // @Test // public void testToDate_SpecificLocale() throws Exception { // final Date date = toDate("SEP 7, 2010 11:49:10 AM", Locale.US); // assertThat(new SimpleDateFormat("yyyy/MM/dd HH:mm:ss").format(date), is("2010/09/07 11:49:10")); // } /** * @throws Exception */ @Test
Registered: Fri Nov 01 20:58:10 UTC 2024 - Last Modified: Thu Mar 07 01:59:08 UTC 2024 - 11.4K bytes - Viewed (0)