clukawski / gullwidth

Go fullwidth text conversion library and CLI

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

gullwidth

Go Reference

Create fullwidth text from ASCII input. For AESTHETIC purposes ONLY.

Usage

CLI

Building

git clone https://github.com/clukawski/gullwidth
cd gullwidth/cmd/gullwidth
go build

Creating fullwidth text

./gullwidth your text here
your text here

Library

See cmd/gullwidth/main.go:

package main

import (
	"fmt"
	"log"
	"os"
	"strings"

	"github.com/clukawski/gullwidth"
)

func main() {
	input := strings.TrimSpace(strings.Join(os.Args[1:], " "))
	fullwidth, err := gullwidth.Fullwidth(input)
	if err != nil {
		log.Fatal(err)
	}
	fmt.Println(fullwidth)
}

About

Go fullwidth text conversion library and CLI

License:MIT License


Languages

Language:Go 100.0%