str
Package str provides lodash/String-style string helpers.
import "github.com/sahilkhaire/gox/str"
Select a symbol below — each page explains what it does, shows Node.js vs Go comparisons, and includes a runnable example.
Functions
| Symbol | Node.js | Kind | Summary |
|---|---|---|---|
| Camel | camelCase(s) | func | Camel converts kebab/snake to camelCase. |
| Capitalize | _.capitalize(s) | func | Capitalize uppercases the first rune. |
| IsBlank | !s.trim() | func | IsBlank reports whether s is empty or only whitespace. |
| PadEnd | s.padEnd(n, ch) | func | PadEnd pads s on the right to length with pad (String.padEnd). |
| PadStart | s.padStart(n, ch) | func | PadStart pads s on the left to length with pad (String.padStart). |
| Pascal | PascalCase(s) | func | Pascal converts to PascalCase. |
| Slug | slugify(s) | func | Slug converts s to a URL-friendly slug. |
| Snake | snake_case(s) | func | Snake converts to snake_case. |
| Truncate | _.truncate(s, n) | func | Truncate shortens s to max runes, adding suffix if needed. |