package
module
Version:
v0.0.21
Opens a new window with list of versions in this module.
Published: Nov 19, 2019
License: MIT
Opens a new window with license information.
Imports: 3
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
mikan.go
mikan.go is mikan.js reimplemented with golang
example
func main() {
mikan := mikan.NewMikan(
mikan.RuneWidth(30),
)
lines := mikan.Split("常に最新、最高のモバイル。Androidを開発した同じチームから。")
fmt.Println(strings.Join(lines, "\n"))
/*
常に最新、最高のモバイル。
<Android>を開発した同じ
チームから。
*/
}
Documentation
¶
Analyze returns the sentence divided into words
type Mikan struct {
RuneWidth int
}
Mikan is core struct
NewMikan create Mikan instance
if you want Mikan's field, set options
Split returns strings that has been split to fit the runeWidth
Option sets the options specified
RuneWidth sets rune width of line
Source Files
¶
Directories
¶
Click to show internal directories.
Click to hide internal directories.