Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 21 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -259,14 +259,30 @@ extra.slugify_opts("Hello World", 0, "_", False) // → "hello_world"

---

## 🏗️ Module Structure
## 🏗️ Module Guide

### Which module should I use?

| Module | When to use | Import |
|--------|-------------|--------|
| **`str`** | Most common operations | `import str` |
| **`str/core`** | Full grapheme-aware API, advanced features | `import str/core` |
| **`str/extra`** | ASCII folding, slugs, case conversions | `import str/extra` |
| **`str/tokenize`** | Reference implementation (pedagogic only) | `import str/tokenize` |

Copilot AI Jan 8, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The term "pedagogic" should be "pedagogical" for proper grammar. "Pedagogical" is the standard adjective form when describing something educational or instructional in nature.

Suggested change
| **`str/tokenize`** | Reference implementation (pedagogic only) | `import str/tokenize` |
| **`str/tokenize`** | Reference implementation (pedagogical only) | `import str/tokenize` |

Copilot uses AI. Check for mistakes.

**Quick start:** Use `import str` for everyday needs. The main `str` module re-exports commonly used functions from `core` and `extra`.

**Advanced users:** Import `str/core` and `str/extra` directly when you need the complete API or want explicit control.

### Module structure

```
str/
├── core # Grapheme-aware core utilities
├── extra # ASCII folding, slugs, case conversions
├── tokenize # Pure-Gleam tokenizer (reference)
└── internal_* # Character tables (internal)
├── str.gleam # Main module (re-exports common functions)
├── core.gleam # Grapheme-aware utilities
├── extra.gleam # ASCII folding, slugs, case conversions
├── tokenize.gleam # Pure-Gleam tokenizer (reference)
└── internal_* # Character tables (not public API)
```

---
Expand Down