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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for turkish_string-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 00df4b11e38228eb7fbe6ae54a4b0ecc1e047349a773d8a1c469243ac32803b3 |
|
MD5 | 95e6e183a8c65d6a96a7e953b1c47685 |
|
BLAKE2b-256 | b91a40d392fb809854ed91fc7fd35b8604c26f42000d0a1f402c07eed4615e01 |