Skip to content

Commit 7a771e2

Browse files
committed
#204-create PCS documentation
intermediate commit.
1 parent 685553f commit 7a771e2

File tree

1 file changed

+25
-3
lines changed

1 file changed

+25
-3
lines changed

README.md

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,28 @@
22

33
What if c++ strings where as easy to use as Python strings?
44

5-
Copyright © 2023-2025 Philippe Schmouker
6-
contact - ph (dot) schmouker (at) gmail (dot) com
5+
Let's just use c++ strings as are Python ones, with same API or as similar API as possible.
6+
Library **cpp-strings** is fully templated. Just download header file `cppstrings.h` and put it anywhere in your project. Notice: all of its stuff is declared and defined in namespace `pcs` - which stands for **P**ythonic **C**++ **S**trings.
7+
8+
* The templated class `pcs::CppStringT<>` defines all constructors and methods that implement the equivalent of Python strings API.
9+
* Class `pcs::CppString` specializes the templated class with `char` characters.
10+
* Class `pcs::CppWString` specializes the templated class with `wchar_t` characters.
11+
12+
**cpp-strings** is implemented with the currently most recent c++ standard available with gcc, clang and msvc c++ compilers, i.e. standard **c++20**.
13+
14+
* directory `cpp-strings` contains the header file `cppstring.h`.
15+
This is the header file to include in your projects.
16+
* directory `cpp-strings-tests` contains the unit test file `cpp-strings-tests.cpp`
17+
This file tests all the library stuff. It is a valuable code container with so many examples of use of the library, the classes, the methods and the functions it defines.
18+
19+
The code has been developed using VS2022 IDE. As such, unitary tests have been coded using Microsoft Visual Studio Cpp Unit Test Framework. The related VS project is provided with this library.
20+
21+
Notice: no clang, gcc or msvc specific declarations or goodies have been use to code library **cpp-strings**. It should then be compilable with any of these compilers. To be able to use it with your project, just ensure that the c++ standard used with you favorite compiler is **c++20**: options `-std=c++20` or
22+
* options `-std=c++20` or `-std=c++latest` for clang and gcc (v. 10 and above),
23+
or option `-std=c++2a` for clang and gcc (v. 9 and earlier);
24+
* options `/std=c++20` or `/std=c++latest` for Visual Studio 2019 and above
25+
26+
If you want to run the unitary tests, well, use Visual Studio 2022. The Community free version will truly be fine. The vcproject associated with the unit tests is already configured to use the option flag `/std:c++latest` since the implemented code uses a very few but very useful c++23 goodies.
727

828

929
---
@@ -30,4 +50,6 @@ contact - ph (dot) schmouker (at) gmail (dot) com
3050

3151

3252
---
33-
## Intro
53+
## Intro
54+
55+
... document creation still in progress ...

0 commit comments

Comments
 (0)