Skip to content
Node: PascalCase(s)github.com/sahilkhaire/gox/str

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) string

Compare: Node.js · Standard Go · gox

js
_.startCase('foo bar').replace(/ /g, '');
go
// Manual string transformation with strings/unicode
go
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.

Back to str package overview

MIT Licensed · Built for Node.js developers moving to Go