textconv 0.0.1

Creator: bradpython12

Last updated:

0 purchases

textconv 0.0.1 Image
textconv 0.0.1 Images

Languages

Categories

Add to Cart

Description:

textconv 0.0.1

textconv
A bulletproof way of converting a string to a byte string or a text string.
APIs are designed to encode or decode raise-free.
In most cases, input object will be either a text string (str type) or
a byte string (bytes type), and default encoding is 'utf-8'.
Usage:
from textconv.text import to_text, to_bytes

# To text string
text_string = to_text(b'caf\xc3\xa9')

# To byte string
byte_string = to_bytes(u'caf\xe9', encoding="latin-1")

# A raise-free version of `str(obj)`
# if a non-string object is provided
text_string = to_text(obj)

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Customer Reviews

There are no reviews.