Skip to main content

Provides alternative string methods to Python's built-in upper(), lower(), capitalize() and title() that work for turkish characters.

Project description

turkish-string

Provides alternative string methods to Python's built-in upper(), lower(), capitalize() and title() that work for turkish characters.

Description

While working with Turkish strings some of the Python's built-in string methods does not work as expected. Especially Turkish characters İ, I, i and ı won't correctly be translated to lower and upper case versions.

turkish-string package provides alternative methods that solve this problem.

Requirements

This package is tested with Python>=3.8 versions.

Installation

pip install turkish-string

Usage

To upper case

from turkish_string import upper_tr

string = 'istanbul Kadıköy'

upper_case = upper_tr(string)

print(upper_case)

İSTANBUL KADIKÖY

To lower case

from turkish_string import lower_tr

string = 'İSTANBUL KADIKÖY'

lower_case = lower_tr(string)

print(lower_case)

istanbul kadıköy

Title

from turkish_string import title_tr

string = 'istanbul kadıköy'

titled = title_tr(string)

print(titled)

İstanbul Kadıköy

Capitalize

from turkish_string import capitalize_tr

string = 'istanbul kadıköy'

capitalized = capitalize_tr(string)

print(capitalized)

İstanbul kadıköy

License

Distributed under the BSD License. See LICENSE for more information.

Contact

Omer Faruk Sari - info@aqilan.com

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

turkish_string-1.0.0.tar.gz (5.0 kB view details)

Uploaded Source

Built Distribution

turkish_string-1.0.0-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for turkish_string-1.0.0.tar.gz
Algorithm Hash digest
SHA256 769e52618eea54a3fd234ef61df917eee4d64c1a3d2458dd63100438b1ee9c18
MD5 4c10becf9dcfc7b48924684eb4076175
BLAKE2b-256 a7a6813c553f653383230b3ac79f41b182f61074c8c34a2016a6dc32f2337e21

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for turkish_string-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 00df4b11e38228eb7fbe6ae54a4b0ecc1e047349a773d8a1c469243ac32803b3
MD5 95e6e183a8c65d6a96a7e953b1c47685
BLAKE2b-256 b91a40d392fb809854ed91fc7fd35b8604c26f42000d0a1f402c07eed4615e01

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page