Skip to content

About

Text transformations in printf's modifier style: case conversions (snake, kebab, camel, pascal, leet, ...), slicing, truncation

Topics

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

14 Commits

Folders and files

Repository files navigation

@skiffyard/texttransform

test Documentation release

Text transformations in the style of printf's modifiers for Jennifer programs: case conversions (snake, kebab, camel, pascal, constant, title, swap, leet, ...), slicing, truncation, trimming and folding, written as a |-separated spec such as trim|fold|case=kebab. It composes with io.sprintf, which keeps its own verbs and presentation modifiers.

This deck is part of Skiffyard, small community decks for Jennifer.

Documentation

Install

jvc add @skiffyard/texttransform

This vendors the deck to vendor/<scope>/texttransform/. Without jvc, unpack the src/ subtree of a release archive (<scope>-texttransform-<version>.tar.gz) there.

Usage

import "@skiffyard/texttransform/" as texttransform;

io.printf("%s=%d\n", texttransform.t("max retries", "case=constant"), 3);   # MAX_RETRIES=3
io.printf("%s\n", texttransform.t("  Crème Brûlée  ", "trim|fold|case=kebab"));   # creme-brulee

Requirements

Jennifer 0.26.0 or newer. No capability: pure string work.

Development

tools/check-all.sh                   # the full gate, as CI runs it
jennifer test src/texttransform_test.j      # the test overlay
tools/check-docs.sh                  # docs against the code
tools/pack.sh dist                   # build the release archive

Licence

LGPL-3.0-only, see LICENSE. Copyright (C) 2026 mplx <mplx@jennifer-lang.dev>.

tools/check-headers.sh checks every source file's SPDX header against deck.toml.

About

Text transformations in printf's modifier style: case conversions (snake, kebab, camel, pascal, leet, ...), slicing, truncation

Topics

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors