Skip to content

tharu-jwd/stringutils-cpp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

StringUtils-CPP

C++/Python integration using pybind11 for high-performance string processing.

Functions

  • reverse_string(text) - String reversal using std::reverse
  • count_char(text, char) - Character counting with STL algorithms
  • find_pattern(text, pattern) - KMP pattern matching algorithm

Performance

C++ implementation provides significant speedups over pure Python:

  • Character counting: ~15x faster
  • Pattern matching: ~24x faster
  • String reversal: ~10x faster

Installation

git clone https://github.com/your-username/stringutils-cpp.git
cd stringutils-cpp
pip install pybind11
pip install -e .

Usage

import stringutils_cpp as su

result = su.reverse_string("hello world")
count = su.count_char("programming", "m")
positions = su.find_pattern("abcabcabc", "abc")

Testing

python test_stringutils.py

Technical Details

  • C++17 with STL algorithms
  • pybind11 for Python bindings
  • Cross-platform compatibility
  • Optimized for performance

About

High performance string processing library with C++ backend and Python bindings for text analysis

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published