digraph

package module
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2024 License: BSD-3-Clause Imports: 10 Imported by: 1

README

Digraph

Build Go Report Card License

Lookup ViM-style digraphs.

Example use
package main

import (
    "fmt"

    "github.com/xyproto/digraph"
)

func main() {
    fmt.Printf("The symbol for My is %c\n", digraph.MustLookup("My"))
}

This outputs:

The symbol for My is µ

Full list of digraphs

General info

Documentation

Overview

Package digraph provides functions for looking up ViM-style digraphs

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func All added in v1.2.0

func All() []string

All returns a string slice of all available digraphs

func Lookup

func Lookup(digraph string) (rune, bool)

Lookup a digraph and return a rune. Returns false if the digraph could not be found.

func LookupDescription

func LookupDescription(digraph string) (string, bool)

LookupDescription tries to look up a digraph and return a description. Returns false if the digraph could not be found.

func MustLookup

func MustLookup(digraph string) rune

MustLookup tries to look up a digraph and return a rune, but does not return any bool or error if the digraph string is not found.

func MustLookupDescription

func MustLookupDescription(digraph string) string

MustLookupDescription tries to look up a digraph and return a description, but it edoes not return any bool or error if the digraph string is not found.

func PrintTable added in v1.3.0

func PrintTable()

PrintTable outputs a table of all available digraphs

Types

This section is empty.

Directories

Path Synopsis
cmd
all command
lookup command
simple command

Jump to

Keyboard shortcuts

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