haiku

package module
v0.0.0-...-209c0f4 Latest Latest
Warning

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

Go to latest
Published: May 26, 2025 License: MIT Imports: 6 Imported by: 0

README

Go Reference

import "code.ppl.town/justin/haiku-detector"

haiku := haiku.Find("haiku can be found wherever you are looking with help of some code")

if len(haiku) > 0 {
    println(haiku[0].String())
}

//   haiku can be found
// wherever you are looking
//  with help of some code

Documentation

Overview

Package haiku finds haiku within English sentences.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Haiku

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

func Find

func Find(s string) []Haiku

Find finds 0 or more haiku in an arbitrary string. The string may contain one or more sentences, delimited by normal English punctuation. A haiku will only be matched against a complete sentence.

func (Haiku) Lines

func (h Haiku) Lines() []string

Lines returns the Haiku as multiple lines.

func (Haiku) String

func (h Haiku) String() string

String returns the Haiku as a single string, with newlines between each line.

Jump to

Keyboard shortcuts

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