btwael/superstring.py
소개
Python에서 대량의 텍스트를 처리할 수 있도록 속도와 메모리 효율을 최적화한 문자열 라이브러리입니다.
개발 도구What you can do
- Fast and Memory-optimized.
- Similar functionalities to python built-in string
- Easy to embed and use.
측정된 스타 증가
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- 0
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
Originalsuperstring.py
superstring.py is an efficient library for heavy-text manipulation in Python, that achieves a remarkable memory and CPU optimization.
superstring.py uses Rope (data structure) and optimization techniques.
Performance example

The two plots show the comparison in terms of memory consumption and execution time between superstring.py and python build-in string (the comparison program consists of appending to a list all possible substrings of a 50000 bytes text).
Features
- Fast and Memory-optimized.
- Rich API.
- Similar functionalities to python built-in string
- Easy to embed and use.
- MIT Licence
Installing
pip install superstring
How to use
from superstring import SuperString
string1 = SuperString(" This is ")
string2 = SuperString("SuperString! ")
# concatenation
string = string1 + string2 # " This is SuperString! "
# print
print(string)
# length
len(string)
string.length()
# character
string[10] # "S"
string.characterAt(10) # "S"
# substring
string[10:21] # "SuperString"
string.substring(10, 21) # "SuperString"
# strip
string.strip() # "This is SuperString!"
# lower
string.lower() # " this is superstring! "
# upper
string.upper() # " THIS IS SUPERSTRING! "
Roadmap
- Optimize even more (I think it's possible :sunglasses:)
- Support for negative indexing
- More benchmark and memory profiling
Contribute and support
You have any feature idea, a bug to correct or an improvement, feel free to open a issue or send your pull request. You can also support the author of superstring.py via Paypal.
LICENCE
MIT LICENCE
관련 프로젝트 살펴보기
불러오는 중…