package
module
Version:
v0.0.0-...-d7af4a4
Opens a new window with list of versions in this module.
Published: Dec 7, 2023
License: MIT
Opens a new window with license information.
Imports: 3
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
kasane
String overlay library for Go
Usage
base := ".......\n.......\n.......\n.......\n......."
s := "xxx\nyyy\nzzz"
out := kasane.OverlayString(base, s, 1, 3)
fmt.Println(out)
// Output:
// .......
// ...xxx.
// ...yyy.
// ...zzz.
// .......
License
MIT
Documentation
¶
OverlayString returns a string with the s string overlaid on the base string.
base := ".......\n.......\n.......\n.......\n......."
s := "xxx\nyyy\nzzz"
out := OverlayString(base, s, 1, 3)
fmt.Println(out)
Output:
.......
...xxx.
...yyy.
...zzz.
.......
WithPadding sets the padding width.
Lines shorter than w are processed with spaces appended.
Source Files
¶
Directories
¶
examples
|
|
|
|
Click to show internal directories.
Click to hide internal directories.