4
La bibliothèque standard Python est livrée avec le module textwrap
qui fournit une fonctionnalité d'habillage de texte simple. Y a-t-il quelque chose de comparable dans la bibliothèque standard java?Existe-t-il une fonction de retour à la ligne dans la bibliothèque standard java?
en Python, il est quelque chose comme ceci:
>>> t = "a really really long string with lots of characters"
>>> import textwrap
>>> textwrap.wrap(t, 20)
['a really really long', 'string with lots of', 'characters']
pouvez-vous ajouter un exemple de fonctionnalité en Python? – danb