PyStringLib — a C++ library implementing Python-like string utilities.
PyStringLib provides a set of string utilities inspired by Python's string API, implemented in modern C++ for performance and embeddability. This repo is primarily C++.
- Source code (src/)
- Headers (include/)
- CMake configuration (CMakeLists.txt)
- Examples (examples/) and tests (tests/) if present
- C++17-compatible compiler (g++, clang, MSVC)
- CMake 3.10+
- Git
- Optional: Conan/vcpkg for dependency management
-
Clone: git clone https://github.com/Pouyazadmehr83/PyStringLib.git cd PyStringLib
-
Create build directory and configure: mkdir build cd build cmake .. -DCMAKE_BUILD_TYPE=Release
-
Build: cmake --build . --config Release
-
(Optional) Run tests: ctest --output-on-failure
g++ -std=c++17 -O2 -Iinclude -o example examples/example.cpp src/pystringlib.cpp
Adjust file names to the actual source structure.
- Link the compiled library to your project or include header-only utilities.
- Example (pseudo): #include "pystringlib/pystring.h" using namespace pystring; auto s = pystring::strip(" hello ");
- Optionally create a package with CPack or provide install targets via CMake: cmake --install . --prefix /usr/local
- Follow C++17 idioms, add tests for new behavior, and provide clear API documentation.
- Raise PRs with test coverage and examples.
Add a LICENSE file (recommended). Author: Pouyazadmehr83