pw

package module
v0.4.9 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2023 License: MIT Imports: 3 Imported by: 4

README

pw: parse words

license

This is for parsing a string into a set of words. For Example:

import "github.com/pschlump/pw"

/* ... */

func ParseLineIntoWords(line string) []string {
	Pw := pw.NewParseWords()
	Pw.SetOptions("C", true, true)
	Pw.SetLine(line)
	rv := Pw.GetWords()
	return rv
}

Will take a line like this one and return an array of words.

Documentation

Index

Constants

View Source
const (
	Version = "Version: 1.0.0"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ParseWords

type ParseWords struct {
	// contains filtered or unexported fields
}

func NewParseWords

func NewParseWords() (pw *ParseWords)

func (*ParseWords) AppendLine

func (this *ParseWords) AppendLine(s string)

func (*ParseWords) GetWords

func (this *ParseWords) GetWords() []string

func (*ParseWords) SetDebug

func (this *ParseWords) SetDebug(b bool)

func (*ParseWords) SetLine

func (this *ParseWords) SetLine(s string)

func (*ParseWords) SetOptions

func (this *ParseWords) SetOptions(qf string, kq, kb bool)

Jump to

Keyboard shortcuts

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