MCPcopy Create free account
hub / github.com/cogentcore/core / String

Function String

base/indent/indent.go:47–52  ·  view source on GitHub ↗

String returns a string of n tabs or n*width spaces depending on the indent character.

(ich Character, n, width int)

Source from the content-addressed store, hash-verified

45
46// String returns a string of n tabs or n*width spaces depending on the indent character.
47func String(ich Character, n, width int) string {
48 if ich == Tab {
49 return Tabs(n)
50 }
51 return Spaces(n, width)
52}
53
54// Bytes returns []byte of n tabs or n*width spaces depending on the indent character.
55func Bytes(ich Character, n, width int) []byte {

Callers 1

TestStringFunction · 0.70

Calls 2

SpacesFunction · 0.85
TabsFunction · 0.70

Tested by 1

TestStringFunction · 0.56