Skip to content

Lean on Humanizer for standard string helpers; drop duplicates #356

Open

Description

@ChrisonSimtian

Tier 2 — Consolidate. src/Fallout.Utilities/Text/String.* (~250 LOC) includes helpers that overlap Humanizer — already referenced (v3.0.1): String.Capitalize.cs (→ Pascalize/Transform), String.Truncate.cs (→ Truncate), String.Indent.cs.

Action

Delegate the standard string ops to Humanizer; delete the redundant helpers.

Keep (domain-specific — do NOT delete)

  • String.Split.cs + String.KnownWords.cs — camelCase/known-word splitting that drives CLI parameter naming. No Humanizer equivalent.
  • String.Quoting.cs — build/CLI-specific quoting.

⚠️ Breaking change

Public extension methods → breaking-change, experimental, batched to yearly major, CHANGELOG migration note. [Obsolete] forwarders where practical.

Acceptance

  • Capitalize/Truncate/Indent delegate to or are replaced by Humanizer
  • Domain-specific splitting/quoting retained
  • CHANGELOG entry + migration note

From dependency-consolidation audit, 2026-06-02.

Activity

  1. added
    enhancementNew feature or request
    breaking-changeChange is breaking — requires major version bump per CLAUDE.md semver policy.
    on Jun 2, 2026
  2. ChrisonSimtian commented on Jun 3, 2026

    @ChrisonSimtian
    CollaboratorAuthor

    Insights from a discarded prototype (old paths; map to onion structure after #359).

    • Humanizer already central (3.0.1) — add the PackageReference, no inline Version.
    • Capitalize -> [Obsolete] forwarder to Transform(CultureInfo.InvariantCulture, To.SentenceCase). SentenceCase matches the old behavior (upper first char, keep the rest). Keep it: public surface + has Cake callers.
    • Truncate/Indent (string overloads): zero non-test callers -> delete. Caution: Humanizer's Truncate has different ellipsis semantics, but nothing depends on it.
    • Don't touch CustomFileWriter.Indent() (different method, returns IDisposable).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    breaking-changeChange is breaking — requires major version bump per CLAUDE.md semver policy.enhancementNew feature or requesttarget/vCurrentTargets the current version

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions