tobiaszheller / strmod

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

strmod

strmod allows to modify string in very readable way.

It is helpful when you need to do multiple operations on single string, like trimming, replacing etc.

Currently it supports most string operations from stdlib strings package and few custom made.

in := "Some text/Other text/Something else "

out := strmod.Modify(in,
	strmod.SplitAndReturnLastPart("/"),
	strmod.TrimSpace(),
	strmod.ReplaceAll(" ", "_"),
	strmod.ToLower(),
)
fmt.Println(out)
// something_else

About

License:MIT License


Languages

Language:Go 100.0%