Stringify the set
()
| 59 | |
| 60 | // Stringify the set |
| 61 | func (set *Set[T]) Stringify() string { |
| 62 | values := make([]string, len(set.Set)) |
| 63 | i := 0 |
| 64 | for s := range set.Set { |
| 65 | values[i] = fmt.Sprint(s) |
| 66 | i++ |
| 67 | } |
| 68 | return strings.Join(values, ",") |
| 69 | } |
| 70 | |
| 71 | // this method is much faster than lineCounter_slow but has the following errors: |
| 72 | // - empty files are reported as 1 line |
no outgoing calls