Left: | ||
Right: |
OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2013 The Go Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style | |
3 // license that can be found in the LICENSE file. | |
4 | |
5 package collate | |
6 | |
7 // A type that implements Weigher can be used as a source for Collator and Searc her. | |
rsc
2013/01/18 21:55:56
s/type that implements //
mpvl
2013/01/23 13:11:19
Done.
| |
8 type Weigher interface { | |
9 // Start finds the start of the segment that includes position p. | |
10 Start(p int, b []byte) int | |
11 | |
12 // StartString finds the start of the segment that includes position p. | |
13 StartString(p int, s string) int | |
14 | |
15 // AppendNext appends Elems to buf corresponding to the longest match | |
16 // of a single character or contraction from the start of s. | |
17 // It returns the new buf and the number of bytes consumed. | |
18 AppendNext(buf []Elem, s []byte) (ce []Elem, n int) | |
19 | |
20 // AppendNextString appends Elems to buf corresponding to the longest ma tch | |
21 // of a single character or contraction from the start of s. | |
22 // It returns the new buf and the number of bytes consumed. | |
23 AppendNextString(buf []Elem, s string) (ce []Elem, n int) | |
24 | |
25 // Domain returns a slice of all single characters and contractions for which | |
26 // collation elements are defined in this table. | |
27 Domain() []string | |
28 } | |
OLD | NEW |