Skip to main content

A sample Python project

Project description

wrap_text

wrap_text é um simples quebrador de texto para qualquer ocasião escrito em Python. Insere quebras de linha.

Funções

  • WrapText - construtor que recebe o texto a ser quebrado. Pode receber 2 (dois) valores: length_wrap quantidade de caracteres a contar para inserir a quebra de linha (trecho). Por padrão quebra o texto a cada 50 caracteres. break_type indica o tipo de quebra a ser inserida. Por padrão insere '\n'. Para html, recomendo setar este argumento com '<br>'.

  • get() - Retorna o texto contendo as quebras de linha.

Exemplos:

meu_texto = "Escrevendo um código numa única linha para testá-lo com a função WrapText."

# Exemplo 1
wt = WrapText(meu_texto, length_wrap=38)
print(wt.get())

>>Escrevendo um código numa única linha
para testá-lo com a função WrapText.

# Exemplo 2
wt = WrapText(meu_texto, length_wrap=38, break_type="<br>")

print(wt.get())

>>Escrevendo um código numa única linha<br>para testá-lo com a função WrapText.

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

singular_wrap_text-1.0.0.tar.gz (3.3 kB view details)

Uploaded Source

Built Distribution

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

singular_wrap_text-1.0.0-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

Details for the file singular_wrap_text-1.0.0.tar.gz.

File metadata

  • Download URL: singular_wrap_text-1.0.0.tar.gz
  • Upload date:
  • Size: 3.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.1

File hashes

Hashes for singular_wrap_text-1.0.0.tar.gz
Algorithm Hash digest
SHA256 bdb07923bafd2289480627f9e19d3f5ede3e6f575726db558b6ccaea1ae8915e
MD5 5389b79803d98bd3ad3e998f71dfbbd4
BLAKE2b-256 a0b6ae1afa126d280a64e1db054ed94f22aec3b1c2d1c233e6f4c3ac4000165e

See more details on using hashes here.

File details

Details for the file singular_wrap_text-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for singular_wrap_text-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3b8fc9b484f38193a78f690e78c882b9eda6c7292bdcfa3f8f763b529be775a9
MD5 682da9e078bdb638618e9a29392ead21
BLAKE2b-256 239dca6ac25cb3a8dade0546358478552914f94c8a6aa72ffd31c1065737ed5f

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