ffmt

package
v0.4.10 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: Apache-2.0 Imports: 4 Imported by: 1

Documentation

Overview

Package ffmt provides functions for formatting Cue values.

Package ffmt provides a function to format a string, reducing the whitespace to a minimum

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompactCueVal

func CompactCueVal(v cue.Value) string

CompactCueVal formats a cue.Value as a string, replacing newline characters with middle dot (·) and squashing the whitespace to a minimum

func CompactFmt

func CompactFmt(formatString string) string

CompactFmt formats a string, reducing the whitespace to a minimum (1) replaces every newline character by a middle dot; (2) replaces any adjacent spaces or tabs following the replaced newline by nothing, (3) replaces any other adjacent adjacent spaces or tabs by a single space

func IndentNestedBrackets added in v0.4.9

func IndentNestedBrackets(s string, brackets string, indent string) (string, error)

IndentNestedBrackets indents nested brackets in a string where brackets is a string of length 2, e.g. "{}", "<>", "[]" and indent is the string to be used for indentation, e.g. " ", "\t"

Types

This section is empty.

Jump to

Keyboard shortcuts

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