We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e5977a3 commit ffc16cfCopy full SHA for ffc16cf
internal/transform/space.go
@@ -12,7 +12,7 @@ func NewSpace(n int) Substring {
12
panic(errors.New("hyperspaced/internal/text/transform.NewSpace: really?"))
13
}
14
15
- sep := toSeparator(n)
+ sep := strings.Repeat(" ", n)
16
17
return func(length, index int, str string) string {
18
if index < length-1 {
@@ -22,13 +22,3 @@ func NewSpace(n int) Substring {
22
return str
23
24
25
-
26
-func toSeparator(length int) string {
27
- var builder strings.Builder
28
29
- for index := 0; index < length; index++ {
30
- builder.WriteString(" ")
31
- }
32
33
- return builder.String()
34
-}
0 commit comments