-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdoc.go
29 lines (29 loc) · 1.02 KB
/
doc.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// Package slug provides functionality to generate URL-friendly slugs
// from Unicode strings with support for multiple languages.
//
// This package is designed to create clean, URL-safe strings from
// any input text, with special handling for various languages and
// character sets. It supports:
//
// - Basic Latin characters (a-z, A-Z).
// - Numbers (0-9).
// - Special character conversion (spaces, underscores to hyphens).
// - Multi-language support through transliteration.
// - Custom character replacement rules.
// - Case transformation (upper/lower).
//
// Usage:
//
// Basic usage with the package-level functions:
//
// slug.Make("Hello World") // returns "Hello-World"
// slug.Lower("Hello World") // returns "hello-world"
// slug.Upper("Hello World") // returns "HELLO-WORLD"
//
// Using the Slug type for more control:
//
// s := slug.New()
// s.Lang("uk").Make("Привіт Світ") // returns transliterated version
//
// The package is thread-safe and can be used in concurrent applications.
package slug