# textx
A small and simple string utilities library written in Gleam.
[](https://hex.pm/packages/textx)
[](https://hexdocs.pm/textx/)
[](https://github.com/dj-kaif/textx)
---
## Features
- Reverse strings
- Check palindromes
- Capitalize first letter
- Count words in a string
---
## Installation
```sh
gleam add textx
```
---
## Example
```gleam
import textx
pub fn main() {
textx.reverse("gleam")
textx.is_palindrome("madam")
textx.capitalize("hello")
textx.word_count("hello world")
}
```
---
## API
### `reverse(text: String) -> String`
Reverses a string using grapheme-safe operations.
---
### `is_palindrome(text: String) -> Bool`
Returns `True` if the string reads the same forwards and backwards.
---
### `capitalize(text: String) -> String`
Capitalizes the first letter of a string.
---
### `word_count(text: String) -> Int`
Counts words separated by spaces.
---
## Repository
https://github.com/dj-kaif/textx
---
## Notes
This library is designed for learning Gleam package structure, including:
- modules
- tests
- publishing to Hex
- functional string processing