Pascal
Overview
Pascal converts to PascalCase.
If you are coming from Node.js, the closest pattern is PascalCase(s).
Signature
go
func Pascal(s string) stringCompare: Node.js · Standard Go · gox
js
_.startCase('foo bar').replace(/ /g, '');go
// Manual string transformation with strings/unicodego
import "github.com/sahilkhaire/gox/str"
s := str.Pascal("foo bar")Example
go
import "github.com/sahilkhaire/gox/str"
s := str.Pascal("foo bar")Tips
Import github.com/sahilkhaire/gox/str and call Pascal directly. See the comparison below for the standard library equivalent.
Standard library alternative
gox wraps the Go standard library or a trusted dependency with Node-familiar naming. You can use the underlying library directly — see the package overview for escape hatches.