misc

package
v0.0.0-...-d1c8724 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2026 License: GPL-3.0, LGPL-2.1 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddCommasRune

func AddCommasRune(instr string) string

AddCommasRune will use runes to add a comma into a numeric string. Just to see if this works. It does.

func CreateOrAppendWithBuffer

func CreateOrAppendWithBuffer(name string) (*os.File, *bufio.Writer, error)

CreateOrAppendWithBuffer This takes a name string and returns a file pointer opened for writing using the bufio routines. Will not truncate or clobber a file.

func CreateOrAppendWithoutBuffer

func CreateOrAppendWithoutBuffer(name string) (*os.File, error)

CreateOrAppendWithoutBuffer This take a name string and returns a simple file pointer, NOT using the bufio routines. Will not truncate or clobber a file.

func Floor

func Floor(real, places float64) float64

Floor -- To automatically fix the small floating point errors introduced by the conversions. Max value for places is 10.

func InsertIntoRuneSlice

func InsertIntoRuneSlice(slice, insertion []rune, index int) []rune

func MakeReplaced

func MakeReplaced(instr string) string

MakeReplaced -- input a string, and uses strings.NewReplacer to '=' -> '+' and ';' -> '*'

func MakeSubst

func MakeSubst(instr string) string

MakeSubst -- input a string, output a string that substitutes '=' -> '+' and ';' -> '*'

func RandRange

func RandRange(minP, maxP int) int

RandRange -- Input a min and a max int, and returns a random int in that range.

func ReadLine

func ReadLine(r *bytes.Reader) (string, error)

ReadLine -- input a *bytes.Reader, and outputs a line delimited by \n, and an error returned by ReadByte that is not io.EOF. io.EOF is expected for each line, so that's not an error.

Types

This section is empty.

Jump to

Keyboard shortcuts

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