Metadata-Version: 1.0
Name: python-tr
Version: 0.0.1
Summary: A Python implementation of the tr algorithm
Home-page: https://github.com/ikegami-yukino/python-tr
Author: Yukino Ikegami
Author-email: yukino0131@me.com
License: MIT License
Description: Python-tr
        =========
        
        This module is a Python implementation of the tr algorithm.
        
        
        If not given option, then replace all characters in string1 with
        the character in the same position in string2.
        
        Following options are available:
        
            c   Replace all complemented characters in string1 with
                the character in the same position in string2.
            d   Delete all characters in string1.
            s   Squeeze all characters in string1.
            cs  Squeeze all the characters in string2 besides "c" replacement.
            ds  Delete all characters in string1. Squeeze all characters
                in string2.
            cd  Delete all complemented characters in string1.
        
        Params:
            <unicode> string1
            <unicode> string2
            <unicode> source
            <basestring> option
        Return:
            <unicode> translated_source
        
        
        Note
        ===========
        In Python2.x, the type of paramaters (string1, string2 and source) must be unicode.
        In Python3.3 or later, the type of paramaters (string1, string2 and source) must be str.
        
        
        Example
        ===========
        Python2.x
        
        >>> from tr import tr
        >>> tr(u'bn', u'cr', u'bunny')
        u'curry'
        >>> tr(u'n', '', u'bunny', 'd')
        u'buy'
        >>> tr(u'n', u'u', u'bunny', 'c')
        u'uunnu'
        >>> tr(u'n', u'', u'bunny', 's')
        u'buny'
        >>> tr(u'bn', '', u'bunny', 'cd')
        u'bnn'
        >>> tr(u'bn', u'cr', u'bunny', 'cs')
        u'brnnr'
        >>> tr(u'bn', u'cr', u'bunny', 'ds')
        u'uy'
        
        
        Python3.3~
        
        
        >>> from tr import tr
        >>> tr('bn', 'cr', 'bunny')
        'curry'
        >>> tr('n', '', 'bunny', 'd')
        'buy'
        >>> tr('n', 'u', 'bunny', 'c')
        'uunnu'
        >>> tr('n', '', 'bunny', 's')
        'buny'
        >>> tr('bn', '', 'bunny', 'cd')
        'bnn'
        >>> tr('bn', 'cr', 'bunny', 'cs')
        'brnnr'
        >>> tr('bn', 'cr', 'bunny', 'ds')
        'uy'
        
        
        CHANGES
        =======
        
        0.0.1 (2014-07-10)
        ----------------
        
        First release.
        
        
Keywords: tr,transliterate,translate
Platform: POSIX
Platform: Windows
Platform: Unix
Platform: MacOS
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Information Technology
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: MacOS
Classifier: Operating System :: Microsoft
Classifier: Operating System :: POSIX
Classifier: Programming Language :: Python :: 2.6
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3.3
Classifier: Programming Language :: Python :: 3.4
Classifier: Topic :: Text Processing
