Tags: schigh/str
Tags
Fix Go Report Card issues: gofmt, cyclomatic complexity, LICENSE Add MIT LICENSE file. Run gofmt -s on case.go. Refactor splitSegment (complexity 27 -> split into segmentSplitter methods) and SlugifyASCII (complexity 17 -> extract classifySlugRune). Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Add token generation, natural sort, pluralization, and fuzzy search RandomToken generates crypto/rand tokens with functional options. NaturalSortKey enables natural sorting via string comparison. Pluralize selects singular/plural form by count. FuzzyMatch and FuzzyMatchAll score strings via JaroWinkler similarity. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Add customizable case conversion and English title case ToSnakeCaseWith, ToCamelCaseWith, ToPascalCaseWith, ToKebabCaseWith, ToTitleCaseWith, ToScreamingSnakeWith accept WithAcronyms option for domain-specific acronym lists. ToTitleCaseEnglish skips articles, conjunctions, and prepositions mid-sentence. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Add conditional and mapping pipeline primitives PipeIf and PipeUnless enable conditional transformations in pipelines. PipeMap splits a string, transforms each part, and rejoins. Includes Lines and Words splitters for common use cases. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Modernize str as a pipeline-first string toolkit Drop all hashing functions (MD5, SHA1, SHA256, HMAC, CRC32, CRC64) and global mutable state. Rebuild from scratch around a func(string) string design language where every transformation is composable via str.Pipe. New API: Pipe, PipeErr, ToSnakeCase, ToCamelCase, ToPascalCase, ToKebabCase, ToTitleCase, ToScreamingSnake, PadLeft, PadRight, Truncate, Substring, Wrap, Reverse, CollapseWhitespace, SlugifyASCII, Levenshtein, JaroWinkler. All rune-based, zero dependencies, no panics, thread-safe. Adds go.mod, GitHub Actions CI, benchmarks, fuzz testing, 97.5% coverage. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>