String returns a string representation of the hash set. The function will panic if it contains an unknown type.
()
| 386 | // String returns a string representation of the hash set. |
| 387 | // The function will panic if it contains an unknown type. |
| 388 | func (h Set) String() string { |
| 389 | a := h.Array() |
| 390 | var r []string |
| 391 | for _, v := range a { |
| 392 | r = append(r, v.String()) |
| 393 | } |
| 394 | return "[" + strings.Join(r, ", ") + "]" |
| 395 | } |
| 396 | |
| 397 | // Equals checks to see if src == dst, but ignores empty strings |
| 398 | // and returns true if either is empty. |