For editing strings in many ways.
Project description
📝 stringtools
Useful tool to edit strings in many ways.
It has tons of functions, and classes especially built to be fast and stable ⚡.
There are 3 categories:
analaysers - Analyse string
ispangram | is_heterogram | is_anagram | is_palindrome | is_tautogram | count_char |
converters - Convert one string value to other string value
bricks |
generators - Generate text inforamation.
generate_nick | Generate_password |
Installation:
pip install stringtools
Usage/Examples
analaysers:
ispangram()
↑ Checks if inputed string is pangram (If it has every letter from aplhabet) e.g:
is_pangram('Watch "Jeopardy!", Alex Trebek\'s fun TV quiz game.')
# -> True
is_pangram('Hello beautiful world!')
# -> False
is_heterogram()
↑ A heterogram is a string in which no letter of the alphabet occurs more than once
is_heterogram("abcd")
# -> True
is_heterogram("abcdd")
# -> False
is_anagram()
↑ Anagram it's a string that contain all letters from other string
is_anagram("Tom Marvolo Riddle", "I Am Lord Voldemort")
# -> True
is_anagram("God", "Good")
# -> False
is_palindrome()
↑ A palindrome is a word, number, phrase, or other sequence of characters which reads the same backward as forward, such as madam or racecar.
is_palindrome(["r","a","d","a","r"])
# -> True
is_palindrome(123)
# -> False
is_tautogram()
↑ A tautogram is a text in which all words start with the same letter.
is_tautogram("Crazy cat, cute, cuddly")
# -> True
is_tautogram("Crazy mouse, cute, cuddly")
# -> False
count_char()
↑ Returns dictionary with every character counted e.g
count_char("OOPp")
# -> {"O": 2, "P": 1, "p": 1}
count_char("OOPp", lowercase=True)
# -> {"o": 2, "p": 2}
converters:
bricks()
↑ Returns bricked version of string
bricks("Hello world!")
# -> "HeLlO WoRlD!
bricks("abcdef")
# -> "AbCdEf"
generators:
generate_nick()
↑ Generate nicknames by inputed vowels, consonants, and other sounds.
for i in range(20):
print(stringtools.generate_nick(length=5))
# ->
# Irrol
# Uppuq
# Aguir
# Moury
# Uwrax
# Ezeoa
# Agaum
# Egeti
# Efuyu
# Iruek
# Qawze
# Oguei
# Hochu
# Maqod
# Suyff
# Idoor
# Keigh
# Uredi
# Eceuy
# Elere
Generate_password()
↑ Generate very strong passwords.
You can choose these options for password:
- English (abcd...)
- Numerals (1234...)
- Special Symbols ('`<*...)
- Own symbols (Any)
- Exclude similar characters (1, l, L, 0, o, O, etc.)
Generate_password(length=50, english=True, symbols=True, numerals=True, exclude_similarities=True)
# -> "C-3?r#$a#[7n>!5\7<8s,(4W)2324C44(-3[4,!%$-!1k1+(Mg"
Generate_password(length=50, english=False, symbols=True, numerals=True)
# -> "_;53.?30,>92:;=.+$}>[>'6;8$1~_'>8$=504-`751]>434_&"
Authors
License 🔑
MIT - Copyright (c) 2022 Beksultan Artykbaev
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
stringtools-0.0.6.tar.gz
(10.0 kB
view hashes)
Built Distribution
Close
Hashes for stringtools-0.0.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2c442e85169afaf7a1f8398e24e29e9a89a61f48fe2c4c13b8800a6889c8ae14 |
|
MD5 | 886335b55288fad2ebcb35ca6646298b |
|
BLAKE2b-256 | 3e241f8ab5bbdb05b98a0b44f8f3f6b9b72a2bcfa797075bb8761d7b88199ca7 |