word

package
v0.0.0-...-c470439 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 28, 2019 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package word provides functions for handling word queries in a string

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func Count

func Count(s string) int

Count returns the total word count of the provided string

Example
package main

import (
	"fmt"

	"github.com/preslavmihaylov/learn-golang/ninja-level-13/ex02/word"
)

func main() {
	fmt.Println(word.Count("one two three"))
}
Output:

3

func UseCount

func UseCount(s string) map[string]int

UseCount returns a map representing the word occurences for each word in the provided string

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL