Documentation ¶
Overview ¶
*
- ByteCounter の考え方を利用して、ワードと行に対するカウンタを実装しなさい。
- bufio.ScanWords が役立つでしょう。 *
- type ByteCounter int *
- func (c *ByteCounter) Write(p []byte) (int, error) {
- *c += ByteCounter(len(p))
- return len(p), nil
- }
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LineCounter ¶
type LineCounter int
type WordCounter ¶
type WordCounter int
Click to show internal directories.
Click to hide internal directories.