Discover Packages
cogentcore.org/core
gox
indent
package
Version:
v0.1.0
Opens a new window with list of versions in this module.
Published: Apr 14, 2024
License: BSD-3-Clause
Opens a new window with license information.
Imports: 2
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
Package indent provides trivial indentation generation methods: Tabs,
Spaces, and Indent with a selector. Also bytes versions.
Just for clarity, simplicity.
Bytes returns []byte of n tabs or n*width spaces depending on the indent char
Len returns the length of the indent string given indent char and indent level
func SpaceBytes(n, width int ) []byte
SpaceBytes returns a []byte of n*width spaces
Spaces returns a string of n*width spaces
String returns a string of n tabs or n*width spaces depending on the indent char
TabBytes returns []byte of n tabs
Tabs returns a string of n tabs
Char is the type of indentation character to use
Source Files
¶
Click to show internal directories.
Click to hide internal directories.