https://github.com/ericfrancis12/stripol
An extremely simple & easy-to-use string interpolation package.
https://github.com/ericfrancis12/stripol
string-interpolation string-manipulation
Last synced: 3 months ago
JSON representation
An extremely simple & easy-to-use string interpolation package.
- Host: GitHub
- URL: https://github.com/ericfrancis12/stripol
- Owner: EricFrancis12
- License: mit
- Created: 2024-09-24T03:49:41.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2024-12-02T17:44:43.000Z (6 months ago)
- Last Synced: 2025-01-14T14:25:02.582Z (5 months ago)
- Topics: string-interpolation, string-manipulation
- Language: Go
- Homepage:
- Size: 12.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# StrIpol
An extremely simple & easy-to-use string interpolation package.
## Example
```go
package mainimport (
"fmt""github.com/EricFrancis12/stripol"
)func main() {
s := stripol.New("{{", "}}")s.RegisterVar("NAME", "Mike Tyson")
s.RegisterVar("PET", "tiger")str := "{{ NAME }} has a pet {{ PET }}."
result := s.Eval(str)fmt.Println(result)
// Mike Tyson has a pet tiger.
}
```## Installation
```bash
go get github.com/EricFrancis12/stripol
```## Testing
```bash
make test
```