---
name: PascalCase
slug: pascalcase
sourceRef: string.go#L166
category: core
subCategory: string
playUrl: https://go.dev/play/p/uxER7XpRHLB
variantHelpers:
  - core#string#pascalcase
similarHelpers:
  - core#string#camelcase
  - core#string#snakecase
  - core#string#kebabcase
  - core#string#capitalize
  - core#string#words
position: 40
signatures:
  - "func PascalCase(str string) string"
---

Converts a string to PascalCase.

```go
lo.PascalCase("hello_world")
// "HelloWorld"
```


