Skip to content

Releases: goloop/scs

v2.1.0

Choose a tag to compare

@goloop goloop released this 12 Jul 08:10
Keep combining marks and use title case for digraphs

v2.0.1

Choose a tag to compare

@goloop goloop released this 01 Jul 18:31

scs v2 — String Case Style. A full redesign around a single universal tokenizer; not source-compatible with v1.

Migrating

  • Import path: github.com/goloop/scs/v2 (was github.com/goloop/scs).
  • Requires Go 1.24+.
  • The lossy StrTo* family and the twelve error-returning pairwise converters
    (CamelToKebab, SnakeToPascal, …) are gone — use the total To* functions
    or Convert.
  • The stateful StringCaseStyle object (New / Eat / Set / Value /
    CopyTo*) is replaced by pure functions and the immutable Caser.
  • Output change: case boundaries are preserved — ToSnake("userID") is now
    user_id, not userid.

Highlights

  • Total converters: ToCamel / ToPascal / ToSnake / ToKebab take a
    string and return a string, never error, and handle input already in any style
    — every style renders from one tokenizer, exposed as Split and Words
    (iter.Seq).
  • New styles: ToScreamingSnake, ToDot, ToTitle, ToSentence.
  • Runtime styles: Convert(style, s), ParseStyle, Style.String /
    Style.Valid; Detect (single-match contract) and the generic Is(style, s).
  • Acronyms: default Title casing (Http, Api, Id) always round-trips;
    all-caps initialisms are opt-in through the reusable, concurrency-safe Caser
    (New, WithAcronyms).
  • Fixed: adjacent words no longer merge into an unsplittable block by
    default; digits attach to neighboring letters (only an explicit separator
    splits a number out); number handling is consistent across every entry point.

v1.1.4

Choose a tag to compare

@goloop goloop released this 13 Dec 18:47
Version 1.1.4

v1.1.3

Choose a tag to compare

@goloop goloop released this 07 Dec 21:53
Version 1.1.3

v1.1.2

Choose a tag to compare

@goloop goloop released this 07 Dec 21:39
Version 1.1.2

v1.1.1

Choose a tag to compare

@goloop goloop released this 06 Jun 15:44

Update License and doc

v1.0.0

Choose a tag to compare

@goloop goloop released this 22 Apr 19:52

New API. Fixed critical issues with word conversion with numbers.