util

package
v0.0.0-...-346aa38 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2020 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Overview

Package util provides some utility functions

Package util provides some utility functions

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CleanEscapeString

func CleanEscapeString(str string) string

CleanEscapeString cleans a string like CleanHtmlString but also escapes double quotes.

func CleanHtmlString

func CleanHtmlString(str string) string

CleanHtmlString does the same as CleanString but also escapes the string to be included in HTML code.

func CleanString

func CleanString(str string) string

CleanString removes ANSI control codes from a string.

Types

type TermSimplifier

type TermSimplifier interface {
	// Simplify simplifies a term
	Simplify(string) string
}

TermSimplifier simplifies terms.

func CreateDummySimplifier

func CreateDummySimplifier() TermSimplifier

CreateDummySimplifier creates an empty simplifier that simply returns the input term as output.

func CreateSimplifier

func CreateSimplifier(opname string, maudec *maude.Client) TermSimplifier

CreateSimplifier constructs a simplifier that uses Maude to simplify terms. The simplification function should be defined in a file named smcview-simp.maude in the current working directory and its name is given by opname.

Be aware that the file smcview-simp.maude will be loaded and any command within it will be executed.

Jump to

Keyboard shortcuts

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