Documentation
¶
Overview ¶
Package flip (╯°□°)╯︵ʇxǝʇ
Go library used to flip text.
Installation ¶
Just go get the package:
go get -u github.com/peterhellberg/flip
Usage ¶
A small usage example
package main
import (
"fmt"
"os"
"strings"
"github.com/peterhellberg/flip"
)
func main() {
fmt.Println(flip.Table(strings.Join(os.Args[1:], " ")))
}
Index ¶
Examples ¶
Constants ¶
View Source
const ( // DefaultEmoticon is the default emoticon used to flip tables DefaultEmoticon = "(╯°□°)╯︵" // GopherEmoticon is the gopher emoticon used to do a gopher flip GopherEmoticon = "ʕ╯◔ϖ◔ʔ╯︵" // AngryEmoticon is an angry emoticon used to angrily flip the table AngryEmoticon = "(ノಠ益ಠ)ノ︵" // SparklyEmoticon is a very sparkly emoticon used to flip the table SparklyEmoticon = "(ノ◕ヮ◕)ノ*:・゚✧*:・゚✧ " )
Variables ¶
View Source
var ( // Table is the default table flipper func Table = Func(DefaultEmoticon) // Gopher is the gopher table flipper func Gopher = Func(GopherEmoticon) // Angry is the angry table flipper func Angry = Func(AngryEmoticon) // Sparkly is the sparkly table flipper func Sparkly = Func(SparklyEmoticon) // Flippers is a map of named flipper funcs Flippers = map[string]func(string) string{ "table": Table, "gopher": Gopher, "angry": Angry, "sparkly": Sparkly, } )
Functions ¶
func Func ¶
Func returns a flipper func
Example ¶
package main
import (
"fmt"
"github.com/peterhellberg/flip"
)
func main() {
fmt.Println(flip.Func("(O_o/︵")("example"))
}
Output: (O_o/︵ǝןdɯɐxǝ
func Reverse ¶
Reverse reverses the given string
Example ¶
package main
import (
"fmt"
"github.com/peterhellberg/flip"
)
func main() {
fmt.Println(flip.Reverse("foo bar"))
}
Output: rab oof
func UpsideDown ¶
UpsideDown turns the given string upside down
Example ¶
package main
import (
"fmt"
"github.com/peterhellberg/flip"
)
func main() {
fmt.Println(flip.UpsideDown("example"))
}
Output: ǝןdɯɐxǝ
Types ¶
Click to show internal directories.
Click to hide internal directories.