Skip to main content

A library for wrapping text

Project description

This is a python library for breaking and wrapping text.

The library provides three functions, wrap, chunk, and break_lines.

chunk breaks a string once, using whitespace, existing hyphens or soft hyphens, or by forcing a hyphen at a given maximum width, returning the head and the tail (as a tuple[str, str], with the second slot of the tuple potentially being an empty string).

break_lines breaks a string into lines of a given maximum width, returning the resulting lines as a list[str].

wrap wraps a text.

Install

pip install tamal

Documentation

See jnthnhrrr.github.io/python-tamal

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tamal-0.1.3.tar.gz (3.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tamal-0.1.3-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

File details

Details for the file tamal-0.1.3.tar.gz.

File metadata

  • Download URL: tamal-0.1.3.tar.gz
  • Upload date:
  • Size: 3.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.12.3 Linux/6.8.0-49-generic

File hashes

Hashes for tamal-0.1.3.tar.gz
Algorithm Hash digest
SHA256 ddaf7a659339303f1a9fee3fc4f2375a3207b1d204f3ff31b13cf6f0bdf8048c
MD5 33ff754c04a4dbc8d9f198e402b01bdc
BLAKE2b-256 592c2fb3faaa1f300b2f19f0dee492633478b6162f04f3c60d4341cbae375a46

See more details on using hashes here.

File details

Details for the file tamal-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: tamal-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 4.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.12.3 Linux/6.8.0-49-generic

File hashes

Hashes for tamal-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 cc2d9c6564b88a35bf1ad3550efccd50acc3be9c44b2d71585ffce79f2c1bba2
MD5 454bed79f6aa4a1aa13be3dd01cc0741
BLAKE2b-256 7d40dc8f3915bd6af709bf6ef390b5c0070f3acb5539639288171a067ac14ea0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page