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.1.tar.gz (3.6 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.1-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: tamal-0.1.1.tar.gz
  • Upload date:
  • Size: 3.6 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.1.tar.gz
Algorithm Hash digest
SHA256 8adde99124170da98bf0eb4eea60583d7310f6e02a9356569a2e002ecda76957
MD5 adf3ddb21d018e7c5950f1eb6944bbf0
BLAKE2b-256 cc3fd8df3dd86af5a0fbcf91caf341637ff6bf5714183bfd7edbdacd4efda3e2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: tamal-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 3.8 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c6f15d046b89b93720322801559412d6a940123e59681affef58ea78c3a16065
MD5 6544ae2e7966be08f374ac7de411956c
BLAKE2b-256 f2c6be86ecb8cf03ab65f6ea77ebafc5a12d828dc7d501e8bfe6ca4bd4ccdd1b

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