├── testing
├── test_string_files
│ └── emptyFile.txt
├── build
│ ├── CMakeFiles
│ │ ├── progress.marks
│ │ ├── cmake.check_cache
│ │ ├── 3.22.1
│ │ │ ├── CompilerIdC
│ │ │ │ └── a.out
│ │ │ ├── CompilerIdCXX
│ │ │ │ └── a.out
│ │ │ ├── CMakeDetermineCompilerABI_C.bin
│ │ │ ├── CMakeDetermineCompilerABI_CXX.bin
│ │ │ ├── CMakeSystem.cmake
│ │ │ ├── CMakeCCompiler.cmake
│ │ │ └── CMakeCXXCompiler.cmake
│ │ ├── CMakeDirectoryInformation.cmake
│ │ └── TargetDirectories.txt
│ ├── lib
│ │ ├── libgmock.a
│ │ ├── libgtest.a
│ │ ├── libgmock_main.a
│ │ └── libgtest_main.a
│ └── cmake_install.cmake
├── fixtures
│ └── test_data.h
└── CMakeLists.txt
├── benchmarking
├── build
│ ├── CMakeFiles
│ │ ├── progress.marks
│ │ ├── cmake.check_cache
│ │ ├── 3.22.1
│ │ │ ├── CompilerIdC
│ │ │ │ └── a.out
│ │ │ ├── CompilerIdCXX
│ │ │ │ └── a.out
│ │ │ ├── CMakeDetermineCompilerABI_C.bin
│ │ │ ├── CMakeDetermineCompilerABI_CXX.bin
│ │ │ ├── CMakeSystem.cmake
│ │ │ ├── CMakeCCompiler.cmake
│ │ │ └── CMakeCXXCompiler.cmake
│ │ ├── CMakeDirectoryInformation.cmake
│ │ ├── TargetDirectories.txt
│ │ └── CMakeError.log
│ └── cmake_install.cmake
├── CMakeLists.txt
└── benchmarks
│ ├── benchmark_validation.cpp
│ ├── benchmark_join.cpp
│ └── benchmark_separate.cpp
├── docs
├── Open documentation
└── html
│ ├── bc_s.png
│ ├── open.png
│ ├── bc_sd.png
│ ├── closed.png
│ ├── nav_f.png
│ ├── nav_fd.png
│ ├── nav_g.png
│ ├── nav_h.png
│ ├── nav_hd.png
│ ├── sync_on.png
│ ├── tab_a.png
│ ├── tab_ad.png
│ ├── tab_b.png
│ ├── tab_bd.png
│ ├── tab_h.png
│ ├── tab_hd.png
│ ├── tab_s.png
│ ├── tab_sd.png
│ ├── splitbar.png
│ ├── splitbard.png
│ ├── sync_off.png
│ ├── search
│ ├── pages_1.js
│ ├── pages_0.js
│ ├── files_0.js
│ ├── all_9.js
│ ├── pages_2.js
│ ├── functions_6.js
│ ├── functions_0.js
│ ├── functions_c.js
│ ├── functions_4.js
│ ├── functions_b.js
│ ├── all_c.js
│ ├── all_7.js
│ ├── all_a.js
│ ├── all_d.js
│ ├── all_3.js
│ ├── all_11.js
│ ├── searchdata.js
│ ├── all_6.js
│ ├── functions_8.js
│ ├── functions_7.js
│ ├── functions_a.js
│ ├── all_12.js
│ ├── all_b.js
│ ├── all_e.js
│ ├── all_0.js
│ ├── functions_2.js
│ ├── all_1.js
│ ├── functions_5.js
│ ├── all_4.js
│ ├── mag.svg
│ ├── mag_d.svg
│ ├── functions_3.js
│ ├── functions_9.js
│ ├── close.svg
│ ├── all_5.js
│ ├── all_10.js
│ ├── mag_sel.svg
│ ├── mag_seld.svg
│ ├── all_8.js
│ ├── functions_1.js
│ ├── all_2.js
│ ├── all_f.js
│ └── search.css
│ ├── minus.svg
│ ├── minusd.svg
│ ├── plus.svg
│ ├── plusd.svg
│ ├── doc.svg
│ ├── docd.svg
│ ├── menudata.js
│ ├── folderclosed.svg
│ ├── folderclosedd.svg
│ ├── folderopend.svg
│ ├── folderopen.svg
│ ├── index.html
│ ├── files.html
│ ├── pages.html
│ ├── deprecated.html
│ └── menu.js
├── html
├── bc_s.png
├── open.png
├── bc_sd.png
├── closed.png
├── nav_f.png
├── nav_fd.png
├── nav_g.png
├── nav_h.png
├── nav_hd.png
├── sync_on.png
├── tab_a.png
├── tab_ad.png
├── tab_b.png
├── tab_bd.png
├── tab_h.png
├── tab_hd.png
├── tab_s.png
├── tab_sd.png
├── splitbar.png
├── splitbard.png
├── sync_off.png
├── search
│ ├── searchdata.js
│ ├── mag.svg
│ ├── mag_d.svg
│ ├── close.svg
│ ├── mag_sel.svg
│ ├── mag_seld.svg
│ └── search.css
├── minus.svg
├── minusd.svg
├── plus.svg
├── plusd.svg
├── menudata.js
├── doc.svg
├── docd.svg
├── folderclosed.svg
├── folderclosedd.svg
├── folderopend.svg
├── folderopen.svg
├── index.html
└── menu.js
├── .github
└── FUNDING.yml
├── .gitignore
├── .clang-format
├── LICENSE
├── KNOWN_ISSUES.md
├── BUILDING.md
├── README.md
├── QUICK_START.md
└── scripts
└── run_tests.sh
/testing/test_string_files/emptyFile.txt:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/testing/build/CMakeFiles/progress.marks:
--------------------------------------------------------------------------------
1 | 14
2 |
--------------------------------------------------------------------------------
/benchmarking/build/CMakeFiles/progress.marks:
--------------------------------------------------------------------------------
1 | 26
2 |
--------------------------------------------------------------------------------
/docs/Open documentation:
--------------------------------------------------------------------------------
1 | ./html/md__2home_2jeff_2stevensStringLib_2README.html
--------------------------------------------------------------------------------
/html/bc_s.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Bucephalus-Studios/stevensStringLib/HEAD/html/bc_s.png
--------------------------------------------------------------------------------
/html/open.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Bucephalus-Studios/stevensStringLib/HEAD/html/open.png
--------------------------------------------------------------------------------
/html/bc_sd.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Bucephalus-Studios/stevensStringLib/HEAD/html/bc_sd.png
--------------------------------------------------------------------------------
/html/closed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Bucephalus-Studios/stevensStringLib/HEAD/html/closed.png
--------------------------------------------------------------------------------
/html/nav_f.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Bucephalus-Studios/stevensStringLib/HEAD/html/nav_f.png
--------------------------------------------------------------------------------
/html/nav_fd.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Bucephalus-Studios/stevensStringLib/HEAD/html/nav_fd.png
--------------------------------------------------------------------------------
/html/nav_g.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Bucephalus-Studios/stevensStringLib/HEAD/html/nav_g.png
--------------------------------------------------------------------------------
/html/nav_h.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Bucephalus-Studios/stevensStringLib/HEAD/html/nav_h.png
--------------------------------------------------------------------------------
/html/nav_hd.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Bucephalus-Studios/stevensStringLib/HEAD/html/nav_hd.png
--------------------------------------------------------------------------------
/html/sync_on.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Bucephalus-Studios/stevensStringLib/HEAD/html/sync_on.png
--------------------------------------------------------------------------------
/html/tab_a.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Bucephalus-Studios/stevensStringLib/HEAD/html/tab_a.png
--------------------------------------------------------------------------------
/html/tab_ad.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Bucephalus-Studios/stevensStringLib/HEAD/html/tab_ad.png
--------------------------------------------------------------------------------
/html/tab_b.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Bucephalus-Studios/stevensStringLib/HEAD/html/tab_b.png
--------------------------------------------------------------------------------
/html/tab_bd.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Bucephalus-Studios/stevensStringLib/HEAD/html/tab_bd.png
--------------------------------------------------------------------------------
/html/tab_h.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Bucephalus-Studios/stevensStringLib/HEAD/html/tab_h.png
--------------------------------------------------------------------------------
/html/tab_hd.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Bucephalus-Studios/stevensStringLib/HEAD/html/tab_hd.png
--------------------------------------------------------------------------------
/html/tab_s.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Bucephalus-Studios/stevensStringLib/HEAD/html/tab_s.png
--------------------------------------------------------------------------------
/html/tab_sd.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Bucephalus-Studios/stevensStringLib/HEAD/html/tab_sd.png
--------------------------------------------------------------------------------
/docs/html/bc_s.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Bucephalus-Studios/stevensStringLib/HEAD/docs/html/bc_s.png
--------------------------------------------------------------------------------
/docs/html/open.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Bucephalus-Studios/stevensStringLib/HEAD/docs/html/open.png
--------------------------------------------------------------------------------
/html/splitbar.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Bucephalus-Studios/stevensStringLib/HEAD/html/splitbar.png
--------------------------------------------------------------------------------
/html/splitbard.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Bucephalus-Studios/stevensStringLib/HEAD/html/splitbard.png
--------------------------------------------------------------------------------
/html/sync_off.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Bucephalus-Studios/stevensStringLib/HEAD/html/sync_off.png
--------------------------------------------------------------------------------
/.github/FUNDING.yml:
--------------------------------------------------------------------------------
1 | # These are supported funding model platforms
2 |
3 |
4 | ko_fi: bucephalus_studios
5 |
--------------------------------------------------------------------------------
/docs/html/bc_sd.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Bucephalus-Studios/stevensStringLib/HEAD/docs/html/bc_sd.png
--------------------------------------------------------------------------------
/docs/html/closed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Bucephalus-Studios/stevensStringLib/HEAD/docs/html/closed.png
--------------------------------------------------------------------------------
/docs/html/nav_f.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Bucephalus-Studios/stevensStringLib/HEAD/docs/html/nav_f.png
--------------------------------------------------------------------------------
/docs/html/nav_fd.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Bucephalus-Studios/stevensStringLib/HEAD/docs/html/nav_fd.png
--------------------------------------------------------------------------------
/docs/html/nav_g.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Bucephalus-Studios/stevensStringLib/HEAD/docs/html/nav_g.png
--------------------------------------------------------------------------------
/docs/html/nav_h.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Bucephalus-Studios/stevensStringLib/HEAD/docs/html/nav_h.png
--------------------------------------------------------------------------------
/docs/html/nav_hd.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Bucephalus-Studios/stevensStringLib/HEAD/docs/html/nav_hd.png
--------------------------------------------------------------------------------
/docs/html/sync_on.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Bucephalus-Studios/stevensStringLib/HEAD/docs/html/sync_on.png
--------------------------------------------------------------------------------
/docs/html/tab_a.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Bucephalus-Studios/stevensStringLib/HEAD/docs/html/tab_a.png
--------------------------------------------------------------------------------
/docs/html/tab_ad.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Bucephalus-Studios/stevensStringLib/HEAD/docs/html/tab_ad.png
--------------------------------------------------------------------------------
/docs/html/tab_b.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Bucephalus-Studios/stevensStringLib/HEAD/docs/html/tab_b.png
--------------------------------------------------------------------------------
/docs/html/tab_bd.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Bucephalus-Studios/stevensStringLib/HEAD/docs/html/tab_bd.png
--------------------------------------------------------------------------------
/docs/html/tab_h.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Bucephalus-Studios/stevensStringLib/HEAD/docs/html/tab_h.png
--------------------------------------------------------------------------------
/docs/html/tab_hd.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Bucephalus-Studios/stevensStringLib/HEAD/docs/html/tab_hd.png
--------------------------------------------------------------------------------
/docs/html/tab_s.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Bucephalus-Studios/stevensStringLib/HEAD/docs/html/tab_s.png
--------------------------------------------------------------------------------
/docs/html/tab_sd.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Bucephalus-Studios/stevensStringLib/HEAD/docs/html/tab_sd.png
--------------------------------------------------------------------------------
/docs/html/splitbar.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Bucephalus-Studios/stevensStringLib/HEAD/docs/html/splitbar.png
--------------------------------------------------------------------------------
/docs/html/splitbard.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Bucephalus-Studios/stevensStringLib/HEAD/docs/html/splitbard.png
--------------------------------------------------------------------------------
/docs/html/sync_off.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Bucephalus-Studios/stevensStringLib/HEAD/docs/html/sync_off.png
--------------------------------------------------------------------------------
/docs/html/search/pages_1.js:
--------------------------------------------------------------------------------
1 | var searchData=
2 | [
3 | ['list_0',['Deprecated List',['../deprecated.html',1,'']]]
4 | ];
5 |
--------------------------------------------------------------------------------
/testing/build/lib/libgmock.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Bucephalus-Studios/stevensStringLib/HEAD/testing/build/lib/libgmock.a
--------------------------------------------------------------------------------
/testing/build/lib/libgtest.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Bucephalus-Studios/stevensStringLib/HEAD/testing/build/lib/libgtest.a
--------------------------------------------------------------------------------
/testing/build/CMakeFiles/cmake.check_cache:
--------------------------------------------------------------------------------
1 | # This file is generated by cmake for dependency checking of the CMakeCache.txt file
2 |
--------------------------------------------------------------------------------
/benchmarking/build/CMakeFiles/cmake.check_cache:
--------------------------------------------------------------------------------
1 | # This file is generated by cmake for dependency checking of the CMakeCache.txt file
2 |
--------------------------------------------------------------------------------
/docs/html/search/pages_0.js:
--------------------------------------------------------------------------------
1 | var searchData=
2 | [
3 | ['deprecated_20list_0',['Deprecated List',['../deprecated.html',1,'']]]
4 | ];
5 |
--------------------------------------------------------------------------------
/testing/build/lib/libgmock_main.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Bucephalus-Studios/stevensStringLib/HEAD/testing/build/lib/libgmock_main.a
--------------------------------------------------------------------------------
/testing/build/lib/libgtest_main.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Bucephalus-Studios/stevensStringLib/HEAD/testing/build/lib/libgtest_main.a
--------------------------------------------------------------------------------
/docs/html/search/files_0.js:
--------------------------------------------------------------------------------
1 | var searchData=
2 | [
3 | ['stevensstringlib_2eh_0',['stevensStringLib.h',['../stevensStringLib_8h.html',1,'']]]
4 | ];
5 |
--------------------------------------------------------------------------------
/docs/html/search/all_9.js:
--------------------------------------------------------------------------------
1 | var searchData=
2 | [
3 | ['join_0',['join',['../stevensStringLib_8h.html#a0a06dfefa8e30a9e16391ac301f0954a',1,'stevensStringLib']]]
4 | ];
5 |
--------------------------------------------------------------------------------
/docs/html/search/pages_2.js:
--------------------------------------------------------------------------------
1 | var searchData=
2 | [
3 | ['stevensstringlib_0',['stevensStringLib',['../md__2home_2jeff_2stevensStringLib_2README.html',1,'']]]
4 | ];
5 |
--------------------------------------------------------------------------------
/testing/build/CMakeFiles/3.22.1/CompilerIdC/a.out:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Bucephalus-Studios/stevensStringLib/HEAD/testing/build/CMakeFiles/3.22.1/CompilerIdC/a.out
--------------------------------------------------------------------------------
/testing/build/CMakeFiles/3.22.1/CompilerIdCXX/a.out:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Bucephalus-Studios/stevensStringLib/HEAD/testing/build/CMakeFiles/3.22.1/CompilerIdCXX/a.out
--------------------------------------------------------------------------------
/docs/html/search/functions_6.js:
--------------------------------------------------------------------------------
1 | var searchData=
2 | [
3 | ['join_0',['join',['../stevensStringLib_8h.html#a0a06dfefa8e30a9e16391ac301f0954a',1,'stevensStringLib']]]
4 | ];
5 |
--------------------------------------------------------------------------------
/benchmarking/build/CMakeFiles/3.22.1/CompilerIdC/a.out:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Bucephalus-Studios/stevensStringLib/HEAD/benchmarking/build/CMakeFiles/3.22.1/CompilerIdC/a.out
--------------------------------------------------------------------------------
/benchmarking/build/CMakeFiles/3.22.1/CompilerIdCXX/a.out:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Bucephalus-Studios/stevensStringLib/HEAD/benchmarking/build/CMakeFiles/3.22.1/CompilerIdCXX/a.out
--------------------------------------------------------------------------------
/html/search/searchdata.js:
--------------------------------------------------------------------------------
1 | var indexSectionsWithContent =
2 | {
3 | };
4 |
5 | var indexSectionNames =
6 | {
7 | };
8 |
9 | var indexSectionLabels =
10 | {
11 | };
12 |
13 |
--------------------------------------------------------------------------------
/docs/html/search/functions_0.js:
--------------------------------------------------------------------------------
1 | var searchData=
2 | [
3 | ['booltostring_0',['boolToString',['../stevensStringLib_8h.html#ac92dec2b0a512e7141df8aa6dd63c86f',1,'stevensStringLib']]]
4 | ];
5 |
--------------------------------------------------------------------------------
/docs/html/search/functions_c.js:
--------------------------------------------------------------------------------
1 | var searchData=
2 | [
3 | ['wraptowidth_0',['wrapToWidth',['../stevensStringLib_8h.html#a13c805758cc20928ee0473b0e0f05b85',1,'stevensStringLib']]]
4 | ];
5 |
--------------------------------------------------------------------------------
/testing/build/CMakeFiles/3.22.1/CMakeDetermineCompilerABI_C.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Bucephalus-Studios/stevensStringLib/HEAD/testing/build/CMakeFiles/3.22.1/CMakeDetermineCompilerABI_C.bin
--------------------------------------------------------------------------------
/testing/build/CMakeFiles/3.22.1/CMakeDetermineCompilerABI_CXX.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Bucephalus-Studios/stevensStringLib/HEAD/testing/build/CMakeFiles/3.22.1/CMakeDetermineCompilerABI_CXX.bin
--------------------------------------------------------------------------------
/benchmarking/build/CMakeFiles/3.22.1/CMakeDetermineCompilerABI_C.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Bucephalus-Studios/stevensStringLib/HEAD/benchmarking/build/CMakeFiles/3.22.1/CMakeDetermineCompilerABI_C.bin
--------------------------------------------------------------------------------
/docs/html/search/functions_4.js:
--------------------------------------------------------------------------------
1 | var searchData=
2 | [
3 | ['getwhitespacestring_0',['getWhitespaceString',['../stevensStringLib_8h.html#a5bbbc5f9915fcdea95ccd3536d77964b',1,'stevensStringLib']]]
4 | ];
5 |
--------------------------------------------------------------------------------
/benchmarking/build/CMakeFiles/3.22.1/CMakeDetermineCompilerABI_CXX.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Bucephalus-Studios/stevensStringLib/HEAD/benchmarking/build/CMakeFiles/3.22.1/CMakeDetermineCompilerABI_CXX.bin
--------------------------------------------------------------------------------
/docs/html/search/functions_b.js:
--------------------------------------------------------------------------------
1 | var searchData=
2 | [
3 | ['unorderedmapifystring_0',['unorderedMapifyString',['../stevensStringLib_8h.html#af0e9087ef54deb687c501000f3516de6',1,'stevensStringLib']]]
4 | ];
5 |
--------------------------------------------------------------------------------
/docs/html/search/all_c.js:
--------------------------------------------------------------------------------
1 | var searchData=
2 | [
3 | ['nord_20tech_20systems_20llc_20beldum_5fpackage_5fmanager_0',['Beldum Package Manager: https://github.com/Nord-Tech-Systems-LLC/beldum_package_manager',['../md__2home_2jeff_2stevensStringLib_2README.html#autotoc_md3',1,'']]]
4 | ];
5 |
--------------------------------------------------------------------------------
/docs/html/search/all_7.js:
--------------------------------------------------------------------------------
1 | var searchData=
2 | [
3 | ['https_3a_20github_20com_20nord_20tech_20systems_20llc_20beldum_5fpackage_5fmanager_0',['Beldum Package Manager: https://github.com/Nord-Tech-Systems-LLC/beldum_package_manager',['../md__2home_2jeff_2stevensStringLib_2README.html#autotoc_md3',1,'']]]
4 | ];
5 |
--------------------------------------------------------------------------------
/docs/html/search/all_a.js:
--------------------------------------------------------------------------------
1 | var searchData=
2 | [
3 | ['list_0',['Deprecated List',['../deprecated.html',1,'']]],
4 | ['llc_20beldum_5fpackage_5fmanager_1',['Beldum Package Manager: https://github.com/Nord-Tech-Systems-LLC/beldum_package_manager',['../md__2home_2jeff_2stevensStringLib_2README.html#autotoc_md3',1,'']]]
5 | ];
6 |
--------------------------------------------------------------------------------
/docs/html/search/all_d.js:
--------------------------------------------------------------------------------
1 | var searchData=
2 | [
3 | ['package_20manager_3a_20https_3a_20github_20com_20nord_20tech_20systems_20llc_20beldum_5fpackage_5fmanager_0',['Beldum Package Manager: https://github.com/Nord-Tech-Systems-LLC/beldum_package_manager',['../md__2home_2jeff_2stevensStringLib_2README.html#autotoc_md3',1,'']]]
4 | ];
5 |
--------------------------------------------------------------------------------
/docs/html/search/all_3.js:
--------------------------------------------------------------------------------
1 | var searchData=
2 | [
3 | ['demo_0',['Demo',['../md__2home_2jeff_2stevensStringLib_2README.html#autotoc_md5',1,'']]],
4 | ['deprecated_20list_1',['Deprecated List',['../deprecated.html',1,'']]],
5 | ['documentation_2',['Documentation',['../md__2home_2jeff_2stevensStringLib_2README.html#autotoc_md11',1,'']]]
6 | ];
7 |
--------------------------------------------------------------------------------
/docs/html/search/all_11.js:
--------------------------------------------------------------------------------
1 | var searchData=
2 | [
3 | ['unorderedmapifystring_0',['unorderedMapifyString',['../stevensStringLib_8h.html#af0e9087ef54deb687c501000f3516de6',1,'stevensStringLib']]],
4 | ['usage_1',['Usage',['../md__2home_2jeff_2stevensStringLib_2README.html#autotoc_md4',1,'']]],
5 | ['usage_3a_2',['Simple installation and usage:',['../md__2home_2jeff_2stevensStringLib_2README.html#autotoc_md1',1,'']]]
6 | ];
7 |
--------------------------------------------------------------------------------
/docs/html/search/searchdata.js:
--------------------------------------------------------------------------------
1 | var indexSectionsWithContent =
2 | {
3 | 0: "abcdefghijlmnprstuw",
4 | 1: "s",
5 | 2: "bcefgijmrstuw",
6 | 3: "dls"
7 | };
8 |
9 | var indexSectionNames =
10 | {
11 | 0: "all",
12 | 1: "files",
13 | 2: "functions",
14 | 3: "pages"
15 | };
16 |
17 | var indexSectionLabels =
18 | {
19 | 0: "All",
20 | 1: "Files",
21 | 2: "Functions",
22 | 3: "Pages"
23 | };
24 |
25 |
--------------------------------------------------------------------------------
/docs/html/search/all_6.js:
--------------------------------------------------------------------------------
1 | var searchData=
2 | [
3 | ['getwhitespacestring_0',['getWhitespaceString',['../stevensStringLib_8h.html#a5bbbc5f9915fcdea95ccd3536d77964b',1,'stevensStringLib']]],
4 | ['github_20com_20nord_20tech_20systems_20llc_20beldum_5fpackage_5fmanager_1',['Beldum Package Manager: https://github.com/Nord-Tech-Systems-LLC/beldum_package_manager',['../md__2home_2jeff_2stevensStringLib_2README.html#autotoc_md3',1,'']]]
5 | ];
6 |
--------------------------------------------------------------------------------
/docs/html/search/functions_8.js:
--------------------------------------------------------------------------------
1 | var searchData=
2 | [
3 | ['removewhitespace_0',['removeWhitespace',['../stevensStringLib_8h.html#acc289dc431709640aac960c1322f4278',1,'stevensStringLib']]],
4 | ['replacesubstr_1',['replaceSubstr',['../stevensStringLib_8h.html#ac671732a9d22e768387c95c5f9d524a7',1,'stevensStringLib']]],
5 | ['reverse_2',['reverse',['../stevensStringLib_8h.html#ac69119030f08c04d17f5ec4c59c0a8b6',1,'stevensStringLib']]]
6 | ];
7 |
--------------------------------------------------------------------------------
/docs/html/search/functions_7.js:
--------------------------------------------------------------------------------
1 | var searchData=
2 | [
3 | ['mapifystring_0',['mapifyString',['../stevensStringLib_8h.html#a93a3b051465b829d63a0c0867193f4cb',1,'stevensStringLib']]],
4 | ['mapifystringhelper_1',['mapifyStringHelper',['../stevensStringLib_8h.html#a412f31d61fe4c1f5158e878100267638',1,'stevensStringLib']]],
5 | ['multiply_2',['multiply',['../stevensStringLib_8h.html#af09205aa6fe016654d45436a4048a027',1,'stevensStringLib']]]
6 | ];
7 |
--------------------------------------------------------------------------------
/testing/build/CMakeFiles/3.22.1/CMakeSystem.cmake:
--------------------------------------------------------------------------------
1 | set(CMAKE_HOST_SYSTEM "Linux-6.8.0-87-generic")
2 | set(CMAKE_HOST_SYSTEM_NAME "Linux")
3 | set(CMAKE_HOST_SYSTEM_VERSION "6.8.0-87-generic")
4 | set(CMAKE_HOST_SYSTEM_PROCESSOR "x86_64")
5 |
6 |
7 |
8 | set(CMAKE_SYSTEM "Linux-6.8.0-87-generic")
9 | set(CMAKE_SYSTEM_NAME "Linux")
10 | set(CMAKE_SYSTEM_VERSION "6.8.0-87-generic")
11 | set(CMAKE_SYSTEM_PROCESSOR "x86_64")
12 |
13 | set(CMAKE_CROSSCOMPILING "FALSE")
14 |
15 | set(CMAKE_SYSTEM_LOADED 1)
16 |
--------------------------------------------------------------------------------
/benchmarking/build/CMakeFiles/3.22.1/CMakeSystem.cmake:
--------------------------------------------------------------------------------
1 | set(CMAKE_HOST_SYSTEM "Linux-6.8.0-87-generic")
2 | set(CMAKE_HOST_SYSTEM_NAME "Linux")
3 | set(CMAKE_HOST_SYSTEM_VERSION "6.8.0-87-generic")
4 | set(CMAKE_HOST_SYSTEM_PROCESSOR "x86_64")
5 |
6 |
7 |
8 | set(CMAKE_SYSTEM "Linux-6.8.0-87-generic")
9 | set(CMAKE_SYSTEM_NAME "Linux")
10 | set(CMAKE_SYSTEM_VERSION "6.8.0-87-generic")
11 | set(CMAKE_SYSTEM_PROCESSOR "x86_64")
12 |
13 | set(CMAKE_CROSSCOMPILING "FALSE")
14 |
15 | set(CMAKE_SYSTEM_LOADED 1)
16 |
--------------------------------------------------------------------------------
/docs/html/search/functions_a.js:
--------------------------------------------------------------------------------
1 | var searchData=
2 | [
3 | ['tolower_0',['toLower',['../stevensStringLib_8h.html#acd42f6dfa6de31b27f58781c57a7762e',1,'stevensStringLib']]],
4 | ['toupper_1',['toUpper',['../stevensStringLib_8h.html#a9c0bf954dd6582f3d6d8781f079689f2',1,'stevensStringLib']]],
5 | ['trim_2',['trim',['../stevensStringLib_8h.html#a5d846cb4529597c7fd190c026892ff6d',1,'stevensStringLib']]],
6 | ['trimwhitespace_3',['trimWhitespace',['../stevensStringLib_8h.html#a3fe6e850aed7869e0cf82a93c42820c1',1,'stevensStringLib']]]
7 | ];
8 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Build directories
2 | ./testing/build/*
3 | !./testing/build/.gitkeep
4 | ./benchmarking/build/*
5 | !./benchmarking/build/.gitkeep
6 |
7 | testing/build*/
8 | benchmarking/build*/
9 |
10 | # FetchContent dependencies (downloaded by CMake)
11 | testing/_deps/
12 | benchmarking/_deps/
13 |
14 | # Test and benchmark results
15 | testing/results/
16 | benchmarking/results/
17 |
18 | # Coverage reports
19 | testing/build*/coverage_report/
20 | testing/build*/coverage*.info
21 |
22 | # CMake generated files
23 | CMakeCache.txt
24 | CMakeFiles/
25 | cmake_install.cmake
26 | Makefile
27 |
--------------------------------------------------------------------------------
/html/minus.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/docs/html/minus.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/html/minusd.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/docs/html/minusd.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/docs/html/search/all_12.js:
--------------------------------------------------------------------------------
1 | var searchData=
2 | [
3 | ['whitespace_20from_20a_20string_3a_0',['Remove all whitespace from a string:',['../md__2home_2jeff_2stevensStringLib_2README.html#autotoc_md7',1,'']]],
4 | ['width_3a_1',['Wrap a string to a certain width:',['../md__2home_2jeff_2stevensStringLib_2README.html#autotoc_md8',1,'']]],
5 | ['wrap_20a_20string_20to_20a_20certain_20width_3a_2',['Wrap a string to a certain width:',['../md__2home_2jeff_2stevensStringLib_2README.html#autotoc_md8',1,'']]],
6 | ['wraptowidth_3',['wrapToWidth',['../stevensStringLib_8h.html#a13c805758cc20928ee0473b0e0f05b85',1,'stevensStringLib']]]
7 | ];
8 |
--------------------------------------------------------------------------------
/docs/html/search/all_b.js:
--------------------------------------------------------------------------------
1 | var searchData=
2 | [
3 | ['manager_3a_20https_3a_20github_20com_20nord_20tech_20systems_20llc_20beldum_5fpackage_5fmanager_0',['Beldum Package Manager: https://github.com/Nord-Tech-Systems-LLC/beldum_package_manager',['../md__2home_2jeff_2stevensStringLib_2README.html#autotoc_md3',1,'']]],
4 | ['mapifystring_1',['mapifyString',['../stevensStringLib_8h.html#a93a3b051465b829d63a0c0867193f4cb',1,'stevensStringLib']]],
5 | ['mapifystringhelper_2',['mapifyStringHelper',['../stevensStringLib_8h.html#a412f31d61fe4c1f5158e878100267638',1,'stevensStringLib']]],
6 | ['multiply_3',['multiply',['../stevensStringLib_8h.html#af09205aa6fe016654d45436a4048a027',1,'stevensStringLib']]]
7 | ];
8 |
--------------------------------------------------------------------------------
/docs/html/search/all_e.js:
--------------------------------------------------------------------------------
1 | var searchData=
2 | [
3 | ['remove_20all_20whitespace_20from_20a_20string_3a_0',['Remove all whitespace from a string:',['../md__2home_2jeff_2stevensStringLib_2README.html#autotoc_md7',1,'']]],
4 | ['removewhitespace_1',['removeWhitespace',['../stevensStringLib_8h.html#acc289dc431709640aac960c1322f4278',1,'stevensStringLib']]],
5 | ['replacesubstr_2',['replaceSubstr',['../stevensStringLib_8h.html#ac671732a9d22e768387c95c5f9d524a7',1,'stevensStringLib']]],
6 | ['requirements_3',['Requirements',['../md__2home_2jeff_2stevensStringLib_2README.html#autotoc_md9',1,'']]],
7 | ['reverse_4',['reverse',['../stevensStringLib_8h.html#ac69119030f08c04d17f5ec4c59c0a8b6',1,'stevensStringLib']]]
8 | ];
9 |
--------------------------------------------------------------------------------
/docs/html/search/all_0.js:
--------------------------------------------------------------------------------
1 | var searchData=
2 | [
3 | ['a_20string_20to_20a_20certain_20width_3a_0',['Wrap a string to a certain width:',['../md__2home_2jeff_2stevensStringLib_2README.html#autotoc_md8',1,'']]],
4 | ['a_20string_3a_1',['a string:',['../md__2home_2jeff_2stevensStringLib_2README.html#autotoc_md7',1,'Remove all whitespace from a string:'],['../md__2home_2jeff_2stevensStringLib_2README.html#autotoc_md6',1,'Separate a string:']]],
5 | ['all_20whitespace_20from_20a_20string_3a_2',['Remove all whitespace from a string:',['../md__2home_2jeff_2stevensStringLib_2README.html#autotoc_md7',1,'']]],
6 | ['and_20usage_3a_3',['Simple installation and usage:',['../md__2home_2jeff_2stevensStringLib_2README.html#autotoc_md1',1,'']]]
7 | ];
8 |
--------------------------------------------------------------------------------
/html/plus.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/html/plusd.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/docs/html/plus.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/docs/html/plusd.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/docs/html/search/functions_2.js:
--------------------------------------------------------------------------------
1 | var searchData=
2 | [
3 | ['endswith_0',['endsWith',['../stevensStringLib_8h.html#acb69a84e86b3cd194600e38aff7c2f19',1,'stevensStringLib']]],
4 | ['erasecharsfromend_1',['eraseCharsFromEnd',['../stevensStringLib_8h.html#ad3dfd6d4329ab7bf69fb1cfd475508c7',1,'stevensStringLib']]],
5 | ['erasecharsfromstart_2',['eraseCharsFromStart',['../stevensStringLib_8h.html#a9b92ac54e4eb76eb32d7fd7ccd0f8de3',1,'stevensStringLib']]],
6 | ['erasenonnumericchars_3',['eraseNonNumericChars',['../stevensStringLib_8h.html#aaac70294354fd548c0fcc74c31f3b924',1,'stevensStringLib']]],
7 | ['erasetrailingzeroes_4',['eraseTrailingZeroes',['../stevensStringLib_8h.html#a4c1be0b03e259aaa8af0f604f104c364',1,'stevensStringLib']]]
8 | ];
9 |
--------------------------------------------------------------------------------
/docs/html/search/all_1.js:
--------------------------------------------------------------------------------
1 | var searchData=
2 | [
3 | ['beldum_20package_20manager_3a_20https_3a_20github_20com_20nord_20tech_20systems_20llc_20beldum_5fpackage_5fmanager_0',['Beldum Package Manager: https://github.com/Nord-Tech-Systems-LLC/beldum_package_manager',['../md__2home_2jeff_2stevensStringLib_2README.html#autotoc_md3',1,'']]],
4 | ['beldum_5fpackage_5fmanager_1',['Beldum Package Manager: https://github.com/Nord-Tech-Systems-LLC/beldum_package_manager',['../md__2home_2jeff_2stevensStringLib_2README.html#autotoc_md3',1,'']]],
5 | ['benchmarking_2',['Benchmarking',['../md__2home_2jeff_2stevensStringLib_2README.html#autotoc_md13',1,'']]],
6 | ['booltostring_3',['boolToString',['../stevensStringLib_8h.html#ac92dec2b0a512e7141df8aa6dd63c86f',1,'stevensStringLib']]]
7 | ];
8 |
--------------------------------------------------------------------------------
/testing/build/CMakeFiles/CMakeDirectoryInformation.cmake:
--------------------------------------------------------------------------------
1 | # CMAKE generated file: DO NOT EDIT!
2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.22
3 |
4 | # Relative path conversion top directories.
5 | set(CMAKE_RELATIVE_PATH_TOP_SOURCE "/home/jeff/cppLibs/stevensStringLib/testing")
6 | set(CMAKE_RELATIVE_PATH_TOP_BINARY "/home/jeff/cppLibs/stevensStringLib/testing/build")
7 |
8 | # Force unix paths in dependencies.
9 | set(CMAKE_FORCE_UNIX_PATHS 1)
10 |
11 |
12 | # The C and CXX include file regular expressions for this directory.
13 | set(CMAKE_C_INCLUDE_REGEX_SCAN "^.*$")
14 | set(CMAKE_C_INCLUDE_REGEX_COMPLAIN "^$")
15 | set(CMAKE_CXX_INCLUDE_REGEX_SCAN ${CMAKE_C_INCLUDE_REGEX_SCAN})
16 | set(CMAKE_CXX_INCLUDE_REGEX_COMPLAIN ${CMAKE_C_INCLUDE_REGEX_COMPLAIN})
17 |
--------------------------------------------------------------------------------
/benchmarking/build/CMakeFiles/CMakeDirectoryInformation.cmake:
--------------------------------------------------------------------------------
1 | # CMAKE generated file: DO NOT EDIT!
2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.22
3 |
4 | # Relative path conversion top directories.
5 | set(CMAKE_RELATIVE_PATH_TOP_SOURCE "/home/jeff/cppLibs/stevensStringLib/benchmarking")
6 | set(CMAKE_RELATIVE_PATH_TOP_BINARY "/home/jeff/cppLibs/stevensStringLib/benchmarking/build")
7 |
8 | # Force unix paths in dependencies.
9 | set(CMAKE_FORCE_UNIX_PATHS 1)
10 |
11 |
12 | # The C and CXX include file regular expressions for this directory.
13 | set(CMAKE_C_INCLUDE_REGEX_SCAN "^.*$")
14 | set(CMAKE_C_INCLUDE_REGEX_COMPLAIN "^$")
15 | set(CMAKE_CXX_INCLUDE_REGEX_SCAN ${CMAKE_C_INCLUDE_REGEX_SCAN})
16 | set(CMAKE_CXX_INCLUDE_REGEX_COMPLAIN ${CMAKE_C_INCLUDE_REGEX_COMPLAIN})
17 |
--------------------------------------------------------------------------------
/docs/html/search/functions_5.js:
--------------------------------------------------------------------------------
1 | var searchData=
2 | [
3 | ['isfloat_0',['isFloat',['../stevensStringLib_8h.html#a31ee6720d9d0028eb7891e9360b6c68a',1,'stevensStringLib']]],
4 | ['isinteger_1',['isInteger',['../stevensStringLib_8h.html#a8eccf0d2f3d7970fc342f4c2faac274a',1,'stevensStringLib']]],
5 | ['isnumber_2',['isNumber',['../stevensStringLib_8h.html#ac011598c8d05818536e48fd96ca2b12d',1,'stevensStringLib']]],
6 | ['ispalindrome_3',['isPalindrome',['../stevensStringLib_8h.html#a3dc7a7ba1770dbc595aa351f8137bb4e',1,'stevensStringLib']]],
7 | ['isscientificnumber_4',['isScientificNumber',['../stevensStringLib_8h.html#a5ff84548f35ed049a4cba5ac01fdf4a6',1,'stevensStringLib']]],
8 | ['isstandardnumber_5',['isStandardNumber',['../stevensStringLib_8h.html#abf228e15ecf74d3127799a6d28b014a8',1,'stevensStringLib']]]
9 | ];
10 |
--------------------------------------------------------------------------------
/docs/html/search/all_4.js:
--------------------------------------------------------------------------------
1 | var searchData=
2 | [
3 | ['easy_20installation_0',['Easy Installation!',['../md__2home_2jeff_2stevensStringLib_2README.html#autotoc_md10',1,'']]],
4 | ['endswith_1',['endsWith',['../stevensStringLib_8h.html#acb69a84e86b3cd194600e38aff7c2f19',1,'stevensStringLib']]],
5 | ['erasecharsfromend_2',['eraseCharsFromEnd',['../stevensStringLib_8h.html#ad3dfd6d4329ab7bf69fb1cfd475508c7',1,'stevensStringLib']]],
6 | ['erasecharsfromstart_3',['eraseCharsFromStart',['../stevensStringLib_8h.html#a9b92ac54e4eb76eb32d7fd7ccd0f8de3',1,'stevensStringLib']]],
7 | ['erasenonnumericchars_4',['eraseNonNumericChars',['../stevensStringLib_8h.html#aaac70294354fd548c0fcc74c31f3b924',1,'stevensStringLib']]],
8 | ['erasetrailingzeroes_5',['eraseTrailingZeroes',['../stevensStringLib_8h.html#a4c1be0b03e259aaa8af0f604f104c364',1,'stevensStringLib']]]
9 | ];
10 |
--------------------------------------------------------------------------------
/html/search/mag.svg:
--------------------------------------------------------------------------------
1 |
2 |
4 |
12 |
14 |
20 |
24 |
25 |
--------------------------------------------------------------------------------
/html/search/mag_d.svg:
--------------------------------------------------------------------------------
1 |
2 |
4 |
12 |
14 |
20 |
24 |
25 |
--------------------------------------------------------------------------------
/docs/html/search/mag.svg:
--------------------------------------------------------------------------------
1 |
2 |
4 |
12 |
14 |
20 |
24 |
25 |
--------------------------------------------------------------------------------
/docs/html/search/mag_d.svg:
--------------------------------------------------------------------------------
1 |
2 |
4 |
12 |
14 |
20 |
24 |
25 |
--------------------------------------------------------------------------------
/docs/html/search/functions_3.js:
--------------------------------------------------------------------------------
1 | var searchData=
2 | [
3 | ['findall_0',['findall',['../stevensStringLib_8h.html#a4bcbc19ce3501fa3e06635657c2ded45',1,'stevensStringLib::findAll(const std::string &str, const std::string &substr)'],['../stevensStringLib_8h.html#aba5eea65943a19263c1a018dda78fe81',1,'stevensStringLib::findAll(const std::string &str, const char ch)']]],
4 | ['format_1',['format',['../stevensStringLib_8h.html#a7058ec839e8d8052fa05c951a4fc0f15',1,'stevensStringLib::format(std::string str, const std::vector< std::string > &replaceStrs, const char &openingFormatBrace='{', const char &closingFormatBrace='}')'],['../stevensStringLib_8h.html#ac5e3a24c71708945cfc73bf2625604c0',1,'stevensStringLib::format(std::string str, const std::unordered_map< std::string, std::string > &formatStrMap, const char &openingFormatBrace='{', const char &closingFormatBrace='}')']]]
5 | ];
6 |
--------------------------------------------------------------------------------
/docs/html/search/functions_9.js:
--------------------------------------------------------------------------------
1 | var searchData=
2 | [
3 | ['scramble_0',['scramble',['../stevensStringLib_8h.html#aafbe94d5777094f6671fd77997f5d4b5',1,'stevensStringLib']]],
4 | ['separate_1',['separate',['../stevensStringLib_8h.html#a1b29b2661c1430ffbac04f0e8a0876a3',1,'stevensStringLib::separate(const std::string_view &str, const char separator=',', const bool omitEmptyStrings=true)'],['../stevensStringLib_8h.html#aff7fd2ec486153c3481c1137155c0980',1,'stevensStringLib::separate(const std::string_view &str, const std::string_view &separator, const bool omitEmptyStrings=true)']]],
5 | ['startswith_2',['startsWith',['../stevensStringLib_8h.html#a608c79000fd38c904b100d5cf9120299',1,'stevensStringLib']]],
6 | ['stringifymap_3',['stringifyMap',['../stevensStringLib_8h.html#a6d11bd6e262a33a72a8bf8ea3e2d2829',1,'stevensStringLib']]],
7 | ['stringtobool_4',['stringToBool',['../stevensStringLib_8h.html#a66cee1aced824a0f8ee615dbf7035478',1,'stevensStringLib']]]
8 | ];
9 |
--------------------------------------------------------------------------------
/html/search/close.svg:
--------------------------------------------------------------------------------
1 |
2 |
4 |
12 |
14 |
18 |
19 |
--------------------------------------------------------------------------------
/docs/html/search/close.svg:
--------------------------------------------------------------------------------
1 |
2 |
4 |
12 |
14 |
18 |
19 |
--------------------------------------------------------------------------------
/.clang-format:
--------------------------------------------------------------------------------
1 | # Format Style Options - Created with Clang Power Tools
2 | ---
3 | AlignOperands: DontAlign
4 | BasedOnStyle: Microsoft
5 | BinPackParameters: false
6 | BraceWrapping:
7 | AfterCaseLabel: false
8 | AfterClass: false
9 | AfterControlStatement: false
10 | AfterEnum: false
11 | AfterFunction: false
12 | AfterNamespace: false
13 | AfterObjCDeclaration: false
14 | AfterStruct: false
15 | AfterUnion: false
16 | AfterExternBlock: false
17 | BeforeCatch: false
18 | BeforeElse: false
19 | IndentBraces: true
20 | SplitEmptyFunction: false
21 | SplitEmptyRecord: false
22 | SplitEmptyNamespace: false
23 | BeforeLambdaBody: false
24 | BeforeWhile: false
25 | BreakBeforeBraces: Allman
26 | ColumnLimit: 0
27 | FixNamespaceComments: false
28 | MaxEmptyLinesToKeep: 3
29 | NamespaceIndentation: All
30 | PointerAlignment: Middle
31 | ReflowComments: false
32 | SortIncludes: false
33 | SpaceAfterLogicalNot: true
34 | SpaceBeforeParens: Never
35 | Standard: Auto
36 | TabWidth: 4
37 | ...
38 |
--------------------------------------------------------------------------------
/docs/html/search/all_5.js:
--------------------------------------------------------------------------------
1 | var searchData=
2 | [
3 | ['findall_0',['findall',['../stevensStringLib_8h.html#a4bcbc19ce3501fa3e06635657c2ded45',1,'stevensStringLib::findAll(const std::string &str, const std::string &substr)'],['../stevensStringLib_8h.html#aba5eea65943a19263c1a018dda78fe81',1,'stevensStringLib::findAll(const std::string &str, const char ch)']]],
4 | ['format_1',['format',['../stevensStringLib_8h.html#a7058ec839e8d8052fa05c951a4fc0f15',1,'stevensStringLib::format(std::string str, const std::vector< std::string > &replaceStrs, const char &openingFormatBrace='{', const char &closingFormatBrace='}')'],['../stevensStringLib_8h.html#ac5e3a24c71708945cfc73bf2625604c0',1,'stevensStringLib::format(std::string str, const std::unordered_map< std::string, std::string > &formatStrMap, const char &openingFormatBrace='{', const char &closingFormatBrace='}')']]],
5 | ['from_20a_20string_3a_2',['Remove all whitespace from a string:',['../md__2home_2jeff_2stevensStringLib_2README.html#autotoc_md7',1,'']]]
6 | ];
7 |
--------------------------------------------------------------------------------
/docs/html/search/all_10.js:
--------------------------------------------------------------------------------
1 | var searchData=
2 | [
3 | ['tech_20systems_20llc_20beldum_5fpackage_5fmanager_0',['Beldum Package Manager: https://github.com/Nord-Tech-Systems-LLC/beldum_package_manager',['../md__2home_2jeff_2stevensStringLib_2README.html#autotoc_md3',1,'']]],
4 | ['testing_1',['Testing',['../md__2home_2jeff_2stevensStringLib_2README.html#autotoc_md12',1,'']]],
5 | ['thanks_2',['Special Thanks',['../md__2home_2jeff_2stevensStringLib_2README.html#autotoc_md14',1,'']]],
6 | ['to_20a_20certain_20width_3a_3',['Wrap a string to a certain width:',['../md__2home_2jeff_2stevensStringLib_2README.html#autotoc_md8',1,'']]],
7 | ['tolower_4',['toLower',['../stevensStringLib_8h.html#acd42f6dfa6de31b27f58781c57a7762e',1,'stevensStringLib']]],
8 | ['toupper_5',['toUpper',['../stevensStringLib_8h.html#a9c0bf954dd6582f3d6d8781f079689f2',1,'stevensStringLib']]],
9 | ['trim_6',['trim',['../stevensStringLib_8h.html#a5d846cb4529597c7fd190c026892ff6d',1,'stevensStringLib']]],
10 | ['trimwhitespace_7',['trimWhitespace',['../stevensStringLib_8h.html#a3fe6e850aed7869e0cf82a93c42820c1',1,'stevensStringLib']]]
11 | ];
12 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2023 Bucephalus-Studios
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/html/search/mag_sel.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
13 |
15 |
21 |
26 |
31 |
32 |
--------------------------------------------------------------------------------
/docs/html/search/mag_sel.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
13 |
15 |
21 |
26 |
31 |
32 |
--------------------------------------------------------------------------------
/html/search/mag_seld.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
13 |
15 |
21 |
26 |
31 |
32 |
--------------------------------------------------------------------------------
/docs/html/search/mag_seld.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
13 |
15 |
21 |
26 |
31 |
32 |
--------------------------------------------------------------------------------
/docs/html/search/all_8.js:
--------------------------------------------------------------------------------
1 | var searchData=
2 | [
3 | ['install_0',['Install',['../md__2home_2jeff_2stevensStringLib_2README.html#autotoc_md2',1,'']]],
4 | ['installation_1',['Easy Installation!',['../md__2home_2jeff_2stevensStringLib_2README.html#autotoc_md10',1,'']]],
5 | ['installation_20and_20usage_3a_2',['Simple installation and usage:',['../md__2home_2jeff_2stevensStringLib_2README.html#autotoc_md1',1,'']]],
6 | ['isfloat_3',['isFloat',['../stevensStringLib_8h.html#a31ee6720d9d0028eb7891e9360b6c68a',1,'stevensStringLib']]],
7 | ['isinteger_4',['isInteger',['../stevensStringLib_8h.html#a8eccf0d2f3d7970fc342f4c2faac274a',1,'stevensStringLib']]],
8 | ['isnumber_5',['isNumber',['../stevensStringLib_8h.html#ac011598c8d05818536e48fd96ca2b12d',1,'stevensStringLib']]],
9 | ['ispalindrome_6',['isPalindrome',['../stevensStringLib_8h.html#a3dc7a7ba1770dbc595aa351f8137bb4e',1,'stevensStringLib']]],
10 | ['isscientificnumber_7',['isScientificNumber',['../stevensStringLib_8h.html#a5ff84548f35ed049a4cba5ac01fdf4a6',1,'stevensStringLib']]],
11 | ['isstandardnumber_8',['isStandardNumber',['../stevensStringLib_8h.html#abf228e15ecf74d3127799a6d28b014a8',1,'stevensStringLib']]]
12 | ];
13 |
--------------------------------------------------------------------------------
/docs/html/search/functions_1.js:
--------------------------------------------------------------------------------
1 | var searchData=
2 | [
3 | ['cap1stchar_0',['cap1stChar',['../stevensStringLib_8h.html#a5c1a2d1fc6655066097dcdca512de63f',1,'stevensStringLib']]],
4 | ['chartostring_1',['charToString',['../stevensStringLib_8h.html#a6af188690b2237371c369d748223b193',1,'stevensStringLib']]],
5 | ['circularindex_2',['circularIndex',['../stevensStringLib_8h.html#a1438c0d1b2a167041cbb2f3f95e5220d',1,'stevensStringLib']]],
6 | ['contains_3',['contains',['../stevensStringLib_8h.html#af83dd4ced359aa4728438f8e469e6f2e',1,'stevensStringLib::contains(const std::string_view &str, const std::string_view &substring)'],['../stevensStringLib_8h.html#aaee6af848c3910d695c0c191dd182c7d',1,'stevensStringLib::contains(const std::string_view &str, const char ch)']]],
7 | ['containsonly_4',['containsOnly',['../stevensStringLib_8h.html#a32ffddbdb3678e6b288f2950cc9bce27',1,'stevensStringLib']]],
8 | ['countfilelines_5',['countFileLines',['../stevensStringLib_8h.html#af737e054dda2d8cc062e45c288304b6e',1,'stevensStringLib']]],
9 | ['countlines_6',['countLines',['../stevensStringLib_8h.html#aa0f3a5f620ba28f0fb0061b2cf54cde7',1,'stevensStringLib']]],
10 | ['csvappend_7',['csvAppend',['../stevensStringLib_8h.html#af43e43c8ee6cd84e832998e00c8564fc',1,'stevensStringLib']]]
11 | ];
12 |
--------------------------------------------------------------------------------
/KNOWN_ISSUES.md:
--------------------------------------------------------------------------------
1 | # Known Issues
2 |
3 | ## Test Failures (8 total)
4 |
5 | ### File Reading Tests (2 failures)
6 | - `CountFileLines.LoadFrankenstein` - Test data file not found
7 | - `CountFileLines.EmptyFile_ReturnsZero` - Test data file not found
8 |
9 | **Issue**: Test data files are not in the expected location.
10 |
11 | ### Number Validation Tests (6 failures)
12 |
13 | #### isInteger Issues
14 | - `'+789'` - Incorrectly returns `true` for numbers with leading `+` sign
15 | - `'1a2b3c'` - Incorrectly returns `true` for mixed alphanumeric strings
16 |
17 | #### isFloat Issues
18 | - `'5.'` - Incorrectly returns `false` for numbers with trailing decimal point
19 | - `'1.5x10^3'` - Incorrectly returns `true` for scientific notation (should be `false`)
20 | - `'2.0X10^-2'` - Incorrectly returns `true` for scientific notation with uppercase X
21 | - `'3.5*10^5'` - Incorrectly returns `true` for scientific notation with asterisk
22 | - `'1a2b3c'` - Incorrectly returns `true` for mixed alphanumeric strings
23 |
24 | **Expected behavior**: `isFloat()` should only return `true` for standard decimal notation, not scientific notation. Scientific notation should only be validated by `isScientificNumber()` and `isNumber()`.
25 |
26 | ## Test Results Summary
27 | - **Passing**: 250/258 tests (96.9%)
28 | - **Failing**: 8/258 tests (3.1%)
29 |
30 | ## Benchmarks
31 | All benchmarks pass successfully ✓
32 |
--------------------------------------------------------------------------------
/html/menudata.js:
--------------------------------------------------------------------------------
1 | /*
2 | @licstart The following is the entire license notice for the JavaScript code in this file.
3 |
4 | The MIT License (MIT)
5 |
6 | Copyright (C) 1997-2020 by Dimitri van Heesch
7 |
8 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software
9 | and associated documentation files (the "Software"), to deal in the Software without restriction,
10 | including without limitation the rights to use, copy, modify, merge, publish, distribute,
11 | sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
12 | furnished to do so, subject to the following conditions:
13 |
14 | The above copyright notice and this permission notice shall be included in all copies or
15 | substantial portions of the Software.
16 |
17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
18 | BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
20 | DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 |
23 | @licend The above is the entire license notice for the JavaScript code in this file
24 | */
25 | var menudata={children:[
26 | {text:"Main Page",url:"index.html"}]}
27 |
--------------------------------------------------------------------------------
/html/doc.svg:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/html/docd.svg:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/docs/html/doc.svg:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/docs/html/docd.svg:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/docs/html/menudata.js:
--------------------------------------------------------------------------------
1 | /*
2 | @licstart The following is the entire license notice for the JavaScript code in this file.
3 |
4 | The MIT License (MIT)
5 |
6 | Copyright (C) 1997-2020 by Dimitri van Heesch
7 |
8 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software
9 | and associated documentation files (the "Software"), to deal in the Software without restriction,
10 | including without limitation the rights to use, copy, modify, merge, publish, distribute,
11 | sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
12 | furnished to do so, subject to the following conditions:
13 |
14 | The above copyright notice and this permission notice shall be included in all copies or
15 | substantial portions of the Software.
16 |
17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
18 | BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
20 | DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 |
23 | @licend The above is the entire license notice for the JavaScript code in this file
24 | */
25 | var menudata={children:[
26 | {text:"Main Page",url:"index.html"},
27 | {text:"Related Pages",url:"pages.html"},
28 | {text:"Files",url:"files.html",children:[
29 | {text:"File List",url:"files.html"}]}]}
30 |
--------------------------------------------------------------------------------
/docs/html/search/all_2.js:
--------------------------------------------------------------------------------
1 | var searchData=
2 | [
3 | ['cap1stchar_0',['cap1stChar',['../stevensStringLib_8h.html#a5c1a2d1fc6655066097dcdca512de63f',1,'stevensStringLib']]],
4 | ['certain_20width_3a_1',['Wrap a string to a certain width:',['../md__2home_2jeff_2stevensStringLib_2README.html#autotoc_md8',1,'']]],
5 | ['chartostring_2',['charToString',['../stevensStringLib_8h.html#a6af188690b2237371c369d748223b193',1,'stevensStringLib']]],
6 | ['circularindex_3',['circularIndex',['../stevensStringLib_8h.html#a1438c0d1b2a167041cbb2f3f95e5220d',1,'stevensStringLib']]],
7 | ['com_20nord_20tech_20systems_20llc_20beldum_5fpackage_5fmanager_4',['Beldum Package Manager: https://github.com/Nord-Tech-Systems-LLC/beldum_package_manager',['../md__2home_2jeff_2stevensStringLib_2README.html#autotoc_md3',1,'']]],
8 | ['contains_5',['contains',['../stevensStringLib_8h.html#af83dd4ced359aa4728438f8e469e6f2e',1,'stevensStringLib::contains(const std::string_view &str, const std::string_view &substring)'],['../stevensStringLib_8h.html#aaee6af848c3910d695c0c191dd182c7d',1,'stevensStringLib::contains(const std::string_view &str, const char ch)']]],
9 | ['containsonly_6',['containsOnly',['../stevensStringLib_8h.html#a32ffddbdb3678e6b288f2950cc9bce27',1,'stevensStringLib']]],
10 | ['countfilelines_7',['countFileLines',['../stevensStringLib_8h.html#af737e054dda2d8cc062e45c288304b6e',1,'stevensStringLib']]],
11 | ['countlines_8',['countLines',['../stevensStringLib_8h.html#aa0f3a5f620ba28f0fb0061b2cf54cde7',1,'stevensStringLib']]],
12 | ['csvappend_9',['csvAppend',['../stevensStringLib_8h.html#af43e43c8ee6cd84e832998e00c8564fc',1,'stevensStringLib']]]
13 | ];
14 |
--------------------------------------------------------------------------------
/html/folderclosed.svg:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/docs/html/folderclosed.svg:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/html/folderclosedd.svg:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/docs/html/folderclosedd.svg:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/testing/build/cmake_install.cmake:
--------------------------------------------------------------------------------
1 | # Install script for directory: /home/jeff/cppLibs/stevensStringLib/testing
2 |
3 | # Set the install prefix
4 | if(NOT DEFINED CMAKE_INSTALL_PREFIX)
5 | set(CMAKE_INSTALL_PREFIX "/usr/local")
6 | endif()
7 | string(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")
8 |
9 | # Set the install configuration name.
10 | if(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME)
11 | if(BUILD_TYPE)
12 | string(REGEX REPLACE "^[^A-Za-z0-9_]+" ""
13 | CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}")
14 | else()
15 | set(CMAKE_INSTALL_CONFIG_NAME "Release")
16 | endif()
17 | message(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"")
18 | endif()
19 |
20 | # Set the component getting installed.
21 | if(NOT CMAKE_INSTALL_COMPONENT)
22 | if(COMPONENT)
23 | message(STATUS "Install component: \"${COMPONENT}\"")
24 | set(CMAKE_INSTALL_COMPONENT "${COMPONENT}")
25 | else()
26 | set(CMAKE_INSTALL_COMPONENT)
27 | endif()
28 | endif()
29 |
30 | # Install shared libraries without execute permission?
31 | if(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE)
32 | set(CMAKE_INSTALL_SO_NO_EXE "1")
33 | endif()
34 |
35 | # Is this installation the result of a crosscompile?
36 | if(NOT DEFINED CMAKE_CROSSCOMPILING)
37 | set(CMAKE_CROSSCOMPILING "FALSE")
38 | endif()
39 |
40 | # Set default install directory permissions.
41 | if(NOT DEFINED CMAKE_OBJDUMP)
42 | set(CMAKE_OBJDUMP "/usr/bin/objdump")
43 | endif()
44 |
45 | if(NOT CMAKE_INSTALL_LOCAL_ONLY)
46 | # Include the install script for the subdirectory.
47 | include("/home/jeff/cppLibs/stevensStringLib/testing/build/_deps/googletest-build/cmake_install.cmake")
48 | endif()
49 |
50 | if(CMAKE_INSTALL_COMPONENT)
51 | set(CMAKE_INSTALL_MANIFEST "install_manifest_${CMAKE_INSTALL_COMPONENT}.txt")
52 | else()
53 | set(CMAKE_INSTALL_MANIFEST "install_manifest.txt")
54 | endif()
55 |
56 | string(REPLACE ";" "\n" CMAKE_INSTALL_MANIFEST_CONTENT
57 | "${CMAKE_INSTALL_MANIFEST_FILES}")
58 | file(WRITE "/home/jeff/cppLibs/stevensStringLib/testing/build/${CMAKE_INSTALL_MANIFEST}"
59 | "${CMAKE_INSTALL_MANIFEST_CONTENT}")
60 |
--------------------------------------------------------------------------------
/benchmarking/build/cmake_install.cmake:
--------------------------------------------------------------------------------
1 | # Install script for directory: /home/jeff/cppLibs/stevensStringLib/benchmarking
2 |
3 | # Set the install prefix
4 | if(NOT DEFINED CMAKE_INSTALL_PREFIX)
5 | set(CMAKE_INSTALL_PREFIX "/usr/local")
6 | endif()
7 | string(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")
8 |
9 | # Set the install configuration name.
10 | if(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME)
11 | if(BUILD_TYPE)
12 | string(REGEX REPLACE "^[^A-Za-z0-9_]+" ""
13 | CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}")
14 | else()
15 | set(CMAKE_INSTALL_CONFIG_NAME "Release")
16 | endif()
17 | message(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"")
18 | endif()
19 |
20 | # Set the component getting installed.
21 | if(NOT CMAKE_INSTALL_COMPONENT)
22 | if(COMPONENT)
23 | message(STATUS "Install component: \"${COMPONENT}\"")
24 | set(CMAKE_INSTALL_COMPONENT "${COMPONENT}")
25 | else()
26 | set(CMAKE_INSTALL_COMPONENT)
27 | endif()
28 | endif()
29 |
30 | # Install shared libraries without execute permission?
31 | if(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE)
32 | set(CMAKE_INSTALL_SO_NO_EXE "1")
33 | endif()
34 |
35 | # Is this installation the result of a crosscompile?
36 | if(NOT DEFINED CMAKE_CROSSCOMPILING)
37 | set(CMAKE_CROSSCOMPILING "FALSE")
38 | endif()
39 |
40 | # Set default install directory permissions.
41 | if(NOT DEFINED CMAKE_OBJDUMP)
42 | set(CMAKE_OBJDUMP "/usr/bin/objdump")
43 | endif()
44 |
45 | if(NOT CMAKE_INSTALL_LOCAL_ONLY)
46 | # Include the install script for the subdirectory.
47 | include("/home/jeff/cppLibs/stevensStringLib/benchmarking/build/_deps/googlebenchmark-build/cmake_install.cmake")
48 | endif()
49 |
50 | if(CMAKE_INSTALL_COMPONENT)
51 | set(CMAKE_INSTALL_MANIFEST "install_manifest_${CMAKE_INSTALL_COMPONENT}.txt")
52 | else()
53 | set(CMAKE_INSTALL_MANIFEST "install_manifest.txt")
54 | endif()
55 |
56 | string(REPLACE ";" "\n" CMAKE_INSTALL_MANIFEST_CONTENT
57 | "${CMAKE_INSTALL_MANIFEST_FILES}")
58 | file(WRITE "/home/jeff/cppLibs/stevensStringLib/benchmarking/build/${CMAKE_INSTALL_MANIFEST}"
59 | "${CMAKE_INSTALL_MANIFEST_CONTENT}")
60 |
--------------------------------------------------------------------------------
/docs/html/search/all_f.js:
--------------------------------------------------------------------------------
1 | var searchData=
2 | [
3 | ['scramble_0',['scramble',['../stevensStringLib_8h.html#aafbe94d5777094f6671fd77997f5d4b5',1,'stevensStringLib']]],
4 | ['separate_1',['separate',['../stevensStringLib_8h.html#a1b29b2661c1430ffbac04f0e8a0876a3',1,'stevensStringLib::separate(const std::string_view &str, const char separator=',', const bool omitEmptyStrings=true)'],['../stevensStringLib_8h.html#aff7fd2ec486153c3481c1137155c0980',1,'stevensStringLib::separate(const std::string_view &str, const std::string_view &separator, const bool omitEmptyStrings=true)']]],
5 | ['separate_20a_20string_3a_2',['Separate a string:',['../md__2home_2jeff_2stevensStringLib_2README.html#autotoc_md6',1,'']]],
6 | ['simple_20installation_20and_20usage_3a_3',['Simple installation and usage:',['../md__2home_2jeff_2stevensStringLib_2README.html#autotoc_md1',1,'']]],
7 | ['special_20thanks_4',['Special Thanks',['../md__2home_2jeff_2stevensStringLib_2README.html#autotoc_md14',1,'']]],
8 | ['startswith_5',['startsWith',['../stevensStringLib_8h.html#a608c79000fd38c904b100d5cf9120299',1,'stevensStringLib']]],
9 | ['stevensstringlib_6',['stevensStringLib',['../md__2home_2jeff_2stevensStringLib_2README.html',1,'']]],
10 | ['stevensstringlib_2eh_7',['stevensStringLib.h',['../stevensStringLib_8h.html',1,'']]],
11 | ['string_20to_20a_20certain_20width_3a_8',['Wrap a string to a certain width:',['../md__2home_2jeff_2stevensStringLib_2README.html#autotoc_md8',1,'']]],
12 | ['string_3a_9',['string:',['../md__2home_2jeff_2stevensStringLib_2README.html#autotoc_md7',1,'Remove all whitespace from a string:'],['../md__2home_2jeff_2stevensStringLib_2README.html#autotoc_md6',1,'Separate a string:']]],
13 | ['stringifymap_10',['stringifyMap',['../stevensStringLib_8h.html#a6d11bd6e262a33a72a8bf8ea3e2d2829',1,'stevensStringLib']]],
14 | ['stringtobool_11',['stringToBool',['../stevensStringLib_8h.html#a66cee1aced824a0f8ee615dbf7035478',1,'stevensStringLib']]],
15 | ['systems_20llc_20beldum_5fpackage_5fmanager_12',['Beldum Package Manager: https://github.com/Nord-Tech-Systems-LLC/beldum_package_manager',['../md__2home_2jeff_2stevensStringLib_2README.html#autotoc_md3',1,'']]]
16 | ];
17 |
--------------------------------------------------------------------------------
/benchmarking/build/CMakeFiles/TargetDirectories.txt:
--------------------------------------------------------------------------------
1 | /home/jeff/cppLibs/stevensStringLib/benchmarking/build/CMakeFiles/Benchmark.dir
2 | /home/jeff/cppLibs/stevensStringLib/benchmarking/build/CMakeFiles/edit_cache.dir
3 | /home/jeff/cppLibs/stevensStringLib/benchmarking/build/CMakeFiles/rebuild_cache.dir
4 | /home/jeff/cppLibs/stevensStringLib/benchmarking/build/CMakeFiles/list_install_components.dir
5 | /home/jeff/cppLibs/stevensStringLib/benchmarking/build/CMakeFiles/install.dir
6 | /home/jeff/cppLibs/stevensStringLib/benchmarking/build/CMakeFiles/install/local.dir
7 | /home/jeff/cppLibs/stevensStringLib/benchmarking/build/CMakeFiles/install/strip.dir
8 | /home/jeff/cppLibs/stevensStringLib/benchmarking/build/_deps/googlebenchmark-build/CMakeFiles/edit_cache.dir
9 | /home/jeff/cppLibs/stevensStringLib/benchmarking/build/_deps/googlebenchmark-build/CMakeFiles/rebuild_cache.dir
10 | /home/jeff/cppLibs/stevensStringLib/benchmarking/build/_deps/googlebenchmark-build/CMakeFiles/list_install_components.dir
11 | /home/jeff/cppLibs/stevensStringLib/benchmarking/build/_deps/googlebenchmark-build/CMakeFiles/install.dir
12 | /home/jeff/cppLibs/stevensStringLib/benchmarking/build/_deps/googlebenchmark-build/CMakeFiles/install/local.dir
13 | /home/jeff/cppLibs/stevensStringLib/benchmarking/build/_deps/googlebenchmark-build/CMakeFiles/install/strip.dir
14 | /home/jeff/cppLibs/stevensStringLib/benchmarking/build/_deps/googlebenchmark-build/src/CMakeFiles/benchmark.dir
15 | /home/jeff/cppLibs/stevensStringLib/benchmarking/build/_deps/googlebenchmark-build/src/CMakeFiles/benchmark_main.dir
16 | /home/jeff/cppLibs/stevensStringLib/benchmarking/build/_deps/googlebenchmark-build/src/CMakeFiles/edit_cache.dir
17 | /home/jeff/cppLibs/stevensStringLib/benchmarking/build/_deps/googlebenchmark-build/src/CMakeFiles/rebuild_cache.dir
18 | /home/jeff/cppLibs/stevensStringLib/benchmarking/build/_deps/googlebenchmark-build/src/CMakeFiles/list_install_components.dir
19 | /home/jeff/cppLibs/stevensStringLib/benchmarking/build/_deps/googlebenchmark-build/src/CMakeFiles/install.dir
20 | /home/jeff/cppLibs/stevensStringLib/benchmarking/build/_deps/googlebenchmark-build/src/CMakeFiles/install/local.dir
21 | /home/jeff/cppLibs/stevensStringLib/benchmarking/build/_deps/googlebenchmark-build/src/CMakeFiles/install/strip.dir
22 |
--------------------------------------------------------------------------------
/testing/build/CMakeFiles/3.22.1/CMakeCCompiler.cmake:
--------------------------------------------------------------------------------
1 | set(CMAKE_C_COMPILER "/usr/bin/cc")
2 | set(CMAKE_C_COMPILER_ARG1 "")
3 | set(CMAKE_C_COMPILER_ID "GNU")
4 | set(CMAKE_C_COMPILER_VERSION "11.4.0")
5 | set(CMAKE_C_COMPILER_VERSION_INTERNAL "")
6 | set(CMAKE_C_COMPILER_WRAPPER "")
7 | set(CMAKE_C_STANDARD_COMPUTED_DEFAULT "17")
8 | set(CMAKE_C_EXTENSIONS_COMPUTED_DEFAULT "ON")
9 | set(CMAKE_C_COMPILE_FEATURES "c_std_90;c_function_prototypes;c_std_99;c_restrict;c_variadic_macros;c_std_11;c_static_assert;c_std_17;c_std_23")
10 | set(CMAKE_C90_COMPILE_FEATURES "c_std_90;c_function_prototypes")
11 | set(CMAKE_C99_COMPILE_FEATURES "c_std_99;c_restrict;c_variadic_macros")
12 | set(CMAKE_C11_COMPILE_FEATURES "c_std_11;c_static_assert")
13 | set(CMAKE_C17_COMPILE_FEATURES "c_std_17")
14 | set(CMAKE_C23_COMPILE_FEATURES "c_std_23")
15 |
16 | set(CMAKE_C_PLATFORM_ID "Linux")
17 | set(CMAKE_C_SIMULATE_ID "")
18 | set(CMAKE_C_COMPILER_FRONTEND_VARIANT "")
19 | set(CMAKE_C_SIMULATE_VERSION "")
20 |
21 |
22 |
23 |
24 | set(CMAKE_AR "/usr/bin/ar")
25 | set(CMAKE_C_COMPILER_AR "/usr/bin/gcc-ar-11")
26 | set(CMAKE_RANLIB "/usr/bin/ranlib")
27 | set(CMAKE_C_COMPILER_RANLIB "/usr/bin/gcc-ranlib-11")
28 | set(CMAKE_LINKER "/usr/bin/ld")
29 | set(CMAKE_MT "")
30 | set(CMAKE_COMPILER_IS_GNUCC 1)
31 | set(CMAKE_C_COMPILER_LOADED 1)
32 | set(CMAKE_C_COMPILER_WORKS TRUE)
33 | set(CMAKE_C_ABI_COMPILED TRUE)
34 |
35 | set(CMAKE_C_COMPILER_ENV_VAR "CC")
36 |
37 | set(CMAKE_C_COMPILER_ID_RUN 1)
38 | set(CMAKE_C_SOURCE_FILE_EXTENSIONS c;m)
39 | set(CMAKE_C_IGNORE_EXTENSIONS h;H;o;O;obj;OBJ;def;DEF;rc;RC)
40 | set(CMAKE_C_LINKER_PREFERENCE 10)
41 |
42 | # Save compiler ABI information.
43 | set(CMAKE_C_SIZEOF_DATA_PTR "8")
44 | set(CMAKE_C_COMPILER_ABI "ELF")
45 | set(CMAKE_C_BYTE_ORDER "LITTLE_ENDIAN")
46 | set(CMAKE_C_LIBRARY_ARCHITECTURE "x86_64-linux-gnu")
47 |
48 | if(CMAKE_C_SIZEOF_DATA_PTR)
49 | set(CMAKE_SIZEOF_VOID_P "${CMAKE_C_SIZEOF_DATA_PTR}")
50 | endif()
51 |
52 | if(CMAKE_C_COMPILER_ABI)
53 | set(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_C_COMPILER_ABI}")
54 | endif()
55 |
56 | if(CMAKE_C_LIBRARY_ARCHITECTURE)
57 | set(CMAKE_LIBRARY_ARCHITECTURE "x86_64-linux-gnu")
58 | endif()
59 |
60 | set(CMAKE_C_CL_SHOWINCLUDES_PREFIX "")
61 | if(CMAKE_C_CL_SHOWINCLUDES_PREFIX)
62 | set(CMAKE_CL_SHOWINCLUDES_PREFIX "${CMAKE_C_CL_SHOWINCLUDES_PREFIX}")
63 | endif()
64 |
65 |
66 |
67 |
68 |
69 | set(CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES "/usr/lib/gcc/x86_64-linux-gnu/11/include;/usr/local/include;/usr/include/x86_64-linux-gnu;/usr/include")
70 | set(CMAKE_C_IMPLICIT_LINK_LIBRARIES "gcc;gcc_s;c;gcc;gcc_s")
71 | set(CMAKE_C_IMPLICIT_LINK_DIRECTORIES "/usr/lib/gcc/x86_64-linux-gnu/11;/usr/lib/x86_64-linux-gnu;/usr/lib;/lib/x86_64-linux-gnu;/lib")
72 | set(CMAKE_C_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "")
73 |
--------------------------------------------------------------------------------
/benchmarking/build/CMakeFiles/3.22.1/CMakeCCompiler.cmake:
--------------------------------------------------------------------------------
1 | set(CMAKE_C_COMPILER "/usr/bin/cc")
2 | set(CMAKE_C_COMPILER_ARG1 "")
3 | set(CMAKE_C_COMPILER_ID "GNU")
4 | set(CMAKE_C_COMPILER_VERSION "11.4.0")
5 | set(CMAKE_C_COMPILER_VERSION_INTERNAL "")
6 | set(CMAKE_C_COMPILER_WRAPPER "")
7 | set(CMAKE_C_STANDARD_COMPUTED_DEFAULT "17")
8 | set(CMAKE_C_EXTENSIONS_COMPUTED_DEFAULT "ON")
9 | set(CMAKE_C_COMPILE_FEATURES "c_std_90;c_function_prototypes;c_std_99;c_restrict;c_variadic_macros;c_std_11;c_static_assert;c_std_17;c_std_23")
10 | set(CMAKE_C90_COMPILE_FEATURES "c_std_90;c_function_prototypes")
11 | set(CMAKE_C99_COMPILE_FEATURES "c_std_99;c_restrict;c_variadic_macros")
12 | set(CMAKE_C11_COMPILE_FEATURES "c_std_11;c_static_assert")
13 | set(CMAKE_C17_COMPILE_FEATURES "c_std_17")
14 | set(CMAKE_C23_COMPILE_FEATURES "c_std_23")
15 |
16 | set(CMAKE_C_PLATFORM_ID "Linux")
17 | set(CMAKE_C_SIMULATE_ID "")
18 | set(CMAKE_C_COMPILER_FRONTEND_VARIANT "")
19 | set(CMAKE_C_SIMULATE_VERSION "")
20 |
21 |
22 |
23 |
24 | set(CMAKE_AR "/usr/bin/ar")
25 | set(CMAKE_C_COMPILER_AR "/usr/bin/gcc-ar-11")
26 | set(CMAKE_RANLIB "/usr/bin/ranlib")
27 | set(CMAKE_C_COMPILER_RANLIB "/usr/bin/gcc-ranlib-11")
28 | set(CMAKE_LINKER "/usr/bin/ld")
29 | set(CMAKE_MT "")
30 | set(CMAKE_COMPILER_IS_GNUCC 1)
31 | set(CMAKE_C_COMPILER_LOADED 1)
32 | set(CMAKE_C_COMPILER_WORKS TRUE)
33 | set(CMAKE_C_ABI_COMPILED TRUE)
34 |
35 | set(CMAKE_C_COMPILER_ENV_VAR "CC")
36 |
37 | set(CMAKE_C_COMPILER_ID_RUN 1)
38 | set(CMAKE_C_SOURCE_FILE_EXTENSIONS c;m)
39 | set(CMAKE_C_IGNORE_EXTENSIONS h;H;o;O;obj;OBJ;def;DEF;rc;RC)
40 | set(CMAKE_C_LINKER_PREFERENCE 10)
41 |
42 | # Save compiler ABI information.
43 | set(CMAKE_C_SIZEOF_DATA_PTR "8")
44 | set(CMAKE_C_COMPILER_ABI "ELF")
45 | set(CMAKE_C_BYTE_ORDER "LITTLE_ENDIAN")
46 | set(CMAKE_C_LIBRARY_ARCHITECTURE "x86_64-linux-gnu")
47 |
48 | if(CMAKE_C_SIZEOF_DATA_PTR)
49 | set(CMAKE_SIZEOF_VOID_P "${CMAKE_C_SIZEOF_DATA_PTR}")
50 | endif()
51 |
52 | if(CMAKE_C_COMPILER_ABI)
53 | set(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_C_COMPILER_ABI}")
54 | endif()
55 |
56 | if(CMAKE_C_LIBRARY_ARCHITECTURE)
57 | set(CMAKE_LIBRARY_ARCHITECTURE "x86_64-linux-gnu")
58 | endif()
59 |
60 | set(CMAKE_C_CL_SHOWINCLUDES_PREFIX "")
61 | if(CMAKE_C_CL_SHOWINCLUDES_PREFIX)
62 | set(CMAKE_CL_SHOWINCLUDES_PREFIX "${CMAKE_C_CL_SHOWINCLUDES_PREFIX}")
63 | endif()
64 |
65 |
66 |
67 |
68 |
69 | set(CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES "/usr/lib/gcc/x86_64-linux-gnu/11/include;/usr/local/include;/usr/include/x86_64-linux-gnu;/usr/include")
70 | set(CMAKE_C_IMPLICIT_LINK_LIBRARIES "gcc;gcc_s;c;gcc;gcc_s")
71 | set(CMAKE_C_IMPLICIT_LINK_DIRECTORIES "/usr/lib/gcc/x86_64-linux-gnu/11;/usr/lib/x86_64-linux-gnu;/usr/lib;/lib/x86_64-linux-gnu;/lib")
72 | set(CMAKE_C_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "")
73 |
--------------------------------------------------------------------------------
/testing/build/CMakeFiles/TargetDirectories.txt:
--------------------------------------------------------------------------------
1 | /home/jeff/cppLibs/stevensStringLib/testing/build/CMakeFiles/Test.dir
2 | /home/jeff/cppLibs/stevensStringLib/testing/build/CMakeFiles/edit_cache.dir
3 | /home/jeff/cppLibs/stevensStringLib/testing/build/CMakeFiles/rebuild_cache.dir
4 | /home/jeff/cppLibs/stevensStringLib/testing/build/CMakeFiles/list_install_components.dir
5 | /home/jeff/cppLibs/stevensStringLib/testing/build/CMakeFiles/install.dir
6 | /home/jeff/cppLibs/stevensStringLib/testing/build/CMakeFiles/install/local.dir
7 | /home/jeff/cppLibs/stevensStringLib/testing/build/CMakeFiles/install/strip.dir
8 | /home/jeff/cppLibs/stevensStringLib/testing/build/_deps/googletest-build/CMakeFiles/edit_cache.dir
9 | /home/jeff/cppLibs/stevensStringLib/testing/build/_deps/googletest-build/CMakeFiles/rebuild_cache.dir
10 | /home/jeff/cppLibs/stevensStringLib/testing/build/_deps/googletest-build/CMakeFiles/list_install_components.dir
11 | /home/jeff/cppLibs/stevensStringLib/testing/build/_deps/googletest-build/CMakeFiles/install.dir
12 | /home/jeff/cppLibs/stevensStringLib/testing/build/_deps/googletest-build/CMakeFiles/install/local.dir
13 | /home/jeff/cppLibs/stevensStringLib/testing/build/_deps/googletest-build/CMakeFiles/install/strip.dir
14 | /home/jeff/cppLibs/stevensStringLib/testing/build/_deps/googletest-build/googlemock/CMakeFiles/gmock.dir
15 | /home/jeff/cppLibs/stevensStringLib/testing/build/_deps/googletest-build/googlemock/CMakeFiles/gmock_main.dir
16 | /home/jeff/cppLibs/stevensStringLib/testing/build/_deps/googletest-build/googlemock/CMakeFiles/edit_cache.dir
17 | /home/jeff/cppLibs/stevensStringLib/testing/build/_deps/googletest-build/googlemock/CMakeFiles/rebuild_cache.dir
18 | /home/jeff/cppLibs/stevensStringLib/testing/build/_deps/googletest-build/googlemock/CMakeFiles/list_install_components.dir
19 | /home/jeff/cppLibs/stevensStringLib/testing/build/_deps/googletest-build/googlemock/CMakeFiles/install.dir
20 | /home/jeff/cppLibs/stevensStringLib/testing/build/_deps/googletest-build/googlemock/CMakeFiles/install/local.dir
21 | /home/jeff/cppLibs/stevensStringLib/testing/build/_deps/googletest-build/googlemock/CMakeFiles/install/strip.dir
22 | /home/jeff/cppLibs/stevensStringLib/testing/build/_deps/googletest-build/googletest/CMakeFiles/gtest.dir
23 | /home/jeff/cppLibs/stevensStringLib/testing/build/_deps/googletest-build/googletest/CMakeFiles/gtest_main.dir
24 | /home/jeff/cppLibs/stevensStringLib/testing/build/_deps/googletest-build/googletest/CMakeFiles/edit_cache.dir
25 | /home/jeff/cppLibs/stevensStringLib/testing/build/_deps/googletest-build/googletest/CMakeFiles/rebuild_cache.dir
26 | /home/jeff/cppLibs/stevensStringLib/testing/build/_deps/googletest-build/googletest/CMakeFiles/list_install_components.dir
27 | /home/jeff/cppLibs/stevensStringLib/testing/build/_deps/googletest-build/googletest/CMakeFiles/install.dir
28 | /home/jeff/cppLibs/stevensStringLib/testing/build/_deps/googletest-build/googletest/CMakeFiles/install/local.dir
29 | /home/jeff/cppLibs/stevensStringLib/testing/build/_deps/googletest-build/googletest/CMakeFiles/install/strip.dir
30 |
--------------------------------------------------------------------------------
/html/folderopend.svg:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/docs/html/folderopend.svg:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/html/folderopen.svg:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
9 |
10 |
11 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/docs/html/folderopen.svg:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
9 |
10 |
11 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/html/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | stevensStringLib: Main Page
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 | stevensStringLib 1.0
25 |
26 | An easy-to-use C++ library with convenient functions for working with strings
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
39 |
40 |
41 |
49 |
50 |
51 |
52 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
Loading...
65 |
Searching...
66 |
No Matches
67 |
68 |
69 |
70 |
71 |
72 |
75 |
76 |
77 |
78 |
81 |
82 |
83 |
--------------------------------------------------------------------------------
/docs/html/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | stevensStringLib: Main Page
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 | stevensStringLib 1.0
25 |
26 | An easy-to-use C++ library with convenient functions for working with strings
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
39 |
40 |
41 |
49 |
50 |
51 |
52 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
Loading...
65 |
Searching...
66 |
No Matches
67 |
68 |
69 |
70 |
71 |
72 |
75 |
76 |
77 |
78 |
81 |
82 |
83 |
--------------------------------------------------------------------------------
/testing/fixtures/test_data.h:
--------------------------------------------------------------------------------
1 | /**
2 | * @file test_data.h
3 | * @brief Centralized test data management for stevensStringLib tests
4 | *
5 | * This file provides reusable test fixtures and common test data
6 | * to ensure consistency across all test suites.
7 | */
8 |
9 | #pragma once
10 |
11 | #include
12 | #include
13 | #include
14 | #include
15 | #include
16 |
17 | namespace TestData {
18 |
19 | /**
20 | * @brief Fixture for large text file testing
21 | *
22 | * Lazy-loads the Frankenstein text file only once per test run
23 | * for efficiency in tests that need large text data.
24 | */
25 | class LargeTextFixture : public ::testing::Test {
26 | protected:
27 | inline static std::string frankenstein_text;
28 | inline static bool loaded = false;
29 |
30 | public:
31 | static void SetUpTestSuite() {
32 | if (!loaded) {
33 | std::filesystem::path test_file =
34 | std::filesystem::path(__FILE__).parent_path().parent_path() /
35 | "test_string_files" / "frankenstein.txt";
36 |
37 | std::ifstream file(test_file);
38 | if (!file.is_open()) {
39 | throw std::runtime_error(
40 | "Cannot load test file: " + test_file.string() +
41 | "\nMake sure test_string_files/frankenstein.txt exists"
42 | );
43 | }
44 |
45 | frankenstein_text = std::string(
46 | std::istreambuf_iterator(file),
47 | std::istreambuf_iterator()
48 | );
49 | loaded = true;
50 | }
51 | }
52 |
53 | static const std::string& getFrankenstein() {
54 | return frankenstein_text;
55 | }
56 | };
57 |
58 | /**
59 | * @brief Common test strings used across multiple test suites
60 | */
61 | namespace Strings {
62 | constexpr auto EMPTY = "";
63 | constexpr auto SINGLE_CHAR = "a";
64 | constexpr auto SIMPLE = "Hello, World!";
65 | constexpr auto UNICODE_BASIC = "Hello 世界";
66 | constexpr auto UNICODE_EMOJI = "Hello 🌍🎉";
67 | constexpr auto WHITESPACE_ALL = " \t\n\r\v\f ";
68 | constexpr auto WHITESPACE_MIXED = " \tHello\n\rWorld \v\f";
69 | constexpr auto NUMERIC_INTEGER = "12345";
70 | constexpr auto NUMERIC_FLOAT = "123.456";
71 | constexpr auto NUMERIC_SCIENTIFIC = "1.23e-4";
72 | constexpr auto NUMERIC_NEGATIVE = "-987.65";
73 | constexpr auto ALPHANUMERIC = "abc123XYZ";
74 | constexpr auto SPECIAL_CHARS = "!@#$%^&*()_+-=[]{}|;:',.<>?/";
75 | constexpr auto PALINDROME = "racecar";
76 | constexpr auto CSV_SAMPLE = "apple,banana,cherry,date,elderberry";
77 | constexpr auto REPEATED_SEPARATORS = "a,,b,,,c,,,,d";
78 | }
79 |
80 | /**
81 | * @brief Test data for number validation tests
82 | */
83 | namespace Numbers {
84 | // Valid integers
85 | inline const std::vector VALID_INTEGERS = {
86 | "0", "1", "123", "-456", "9999", "+42"
87 | };
88 |
89 | // Valid floats
90 | inline const std::vector VALID_FLOATS = {
91 | "0.0", "1.5", "123.456", "-987.654", ".5", "5.", "1.0e10", "2.5e-3"
92 | };
93 |
94 | // Invalid numbers
95 | inline const std::vector INVALID_NUMBERS = {
96 | "", "abc", "12.34.56", "1.2.3e4", "inf", "NaN", "12a34"
97 | };
98 | }
99 |
100 | } // namespace TestData
101 |
--------------------------------------------------------------------------------
/benchmarking/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | cmake_minimum_required(VERSION 3.22.1)
2 |
3 | project(Benchmark C CXX)
4 |
5 | # ============================================================================
6 | # Compiler Settings
7 | # ============================================================================
8 |
9 | # Google Benchmark and stevensStringLib require C++17
10 | set(CMAKE_C_STANDARD 99)
11 | set(CMAKE_CXX_STANDARD 17)
12 | set(CMAKE_CXX_STANDARD_REQUIRED ON)
13 |
14 | # ============================================================================
15 | # Build Options
16 | # ============================================================================
17 |
18 |
19 | # ============================================================================
20 | # Add Google Benchmark - Using FetchContent (no submodules needed!)
21 | # ============================================================================
22 |
23 | include(FetchContent)
24 |
25 | message(STATUS "Fetching Google Benchmark...")
26 | FetchContent_Declare(
27 | googlebenchmark
28 | GIT_REPOSITORY https://github.com/google/benchmark.git
29 | GIT_TAG v1.8.3 # Latest stable release
30 | GIT_SHALLOW TRUE # Only download latest commit
31 | FIND_PACKAGE_ARGS NAMES benchmark
32 | )
33 |
34 | # Disable benchmark tests
35 | set(BENCHMARK_ENABLE_TESTING OFF CACHE BOOL "" FORCE)
36 | set(BENCHMARK_ENABLE_GTEST_TESTS OFF CACHE BOOL "" FORCE)
37 |
38 | # Make Google Benchmark available
39 | FetchContent_MakeAvailable(googlebenchmark)
40 |
41 | # ============================================================================
42 | # Benchmark Source Files - New Modular Structure
43 | # ============================================================================
44 |
45 | set(BENCHMARK_SOURCES
46 | benchmarks/benchmark_separate.cpp
47 | benchmarks/benchmark_join.cpp
48 | benchmarks/benchmark_validation.cpp
49 | )
50 |
51 | # ============================================================================
52 | # Create Benchmark Executable
53 | # ============================================================================
54 |
55 | add_executable(${PROJECT_NAME} ${BENCHMARK_SOURCES})
56 |
57 | target_include_directories(${PROJECT_NAME} PRIVATE
58 | ${CMAKE_CURRENT_SOURCE_DIR}
59 | ${CMAKE_CURRENT_SOURCE_DIR}/..
60 | )
61 |
62 | target_link_libraries(${PROJECT_NAME} PRIVATE
63 | benchmark::benchmark_main
64 | )
65 |
66 | # ============================================================================
67 | # Optimization Flags for Release Builds
68 | # ============================================================================
69 |
70 | if(CMAKE_BUILD_TYPE STREQUAL "Release")
71 | if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
72 | target_compile_options(${PROJECT_NAME} PRIVATE
73 | -O3
74 | -march=native
75 | -DNDEBUG
76 | )
77 | elseif(CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
78 | target_compile_options(${PROJECT_NAME} PRIVATE
79 | /O2
80 | /DNDEBUG
81 | )
82 | endif()
83 | endif()
84 |
85 |
86 | # ============================================================================
87 | # Print Configuration Summary
88 | # ============================================================================
89 |
90 | message(STATUS "")
91 | message(STATUS "=== Benchmark Configuration Summary ===")
92 | message(STATUS "Build type: ${CMAKE_BUILD_TYPE}")
93 | message(STATUS "C++ Standard: ${CMAKE_CXX_STANDARD}")
94 | message(STATUS "Compiler: ${CMAKE_CXX_COMPILER_ID}")
95 | message(STATUS "========================================")
96 | message(STATUS "")
97 |
--------------------------------------------------------------------------------
/BUILDING.md:
--------------------------------------------------------------------------------
1 | # Building and Running Tests & Benchmarks
2 |
3 | ## Overview
4 |
5 | The tests and benchmarks are split into multiple files for better organization:
6 |
7 | **Tests** (in `testing/unit/`):
8 | - `string_validation_test.cpp` - Validation functions (isInteger, isFloat, etc.)
9 | - `string_manipulation_test.cpp` - Manipulation functions (reverse, scramble, wrapToWidth, etc.)
10 | - `string_searching_test.cpp` - Search functions (contains, findAll, startsWith, etc.)
11 | - `string_conversion_test.cpp` - Conversion functions (format, replaceSubstr, mapifyString, etc.)
12 | - `property_based_test.cpp` - Property-based randomized tests
13 |
14 | **Benchmarks** (in `benchmarking/benchmarks/`):
15 | - `benchmark_separate.cpp` - Benchmarks for separate() function
16 | - `benchmark_join.cpp` - Benchmarks for join() function
17 | - `benchmark_validation.cpp` - Benchmarks for validation functions
18 |
19 | CMake automatically compiles all these files into **single executables**:
20 | - `Test` - All tests combined
21 | - `Benchmark` - All benchmarks combined
22 |
23 | ## Building Tests
24 |
25 | ```bash
26 | cd testing
27 | mkdir build && cd build
28 | cmake -DCMAKE_BUILD_TYPE=Release ..
29 | make -j8
30 | ```
31 |
32 | This creates a single executable: `./Test`
33 |
34 | ## Running Tests
35 |
36 | ```bash
37 | # From testing/build directory:
38 | cd .. # Go back to testing/ directory
39 | ./build/Test
40 |
41 | # Or run specific test suites:
42 | ./build/Test --gtest_filter="WrapToWidth.*"
43 | ./build/Test --gtest_filter="Separate.*"
44 |
45 | # List all tests:
46 | ./build/Test --gtest_list_tests
47 | ```
48 |
49 | ## Building Benchmarks
50 |
51 | ```bash
52 | cd benchmarking
53 | mkdir build && cd build
54 | cmake -DCMAKE_BUILD_TYPE=Release ..
55 | make -j8
56 | ```
57 |
58 | This creates a single executable: `./Benchmark`
59 |
60 | ## Running Benchmarks
61 |
62 | ```bash
63 | # From benchmarking/build directory:
64 | cd .. # Go back to benchmarking/ directory
65 | ./build/Benchmark
66 |
67 | # Run specific benchmarks:
68 | ./build/Benchmark --benchmark_filter="Separate_.*"
69 | ./build/Benchmark --benchmark_filter="Join_.*"
70 |
71 | # List all benchmarks:
72 | ./build/Benchmark --benchmark_list_tests
73 |
74 | # Save results to JSON:
75 | ./build/Benchmark --benchmark_out=results.json --benchmark_out_format=json
76 | ```
77 |
78 | ## Helper Scripts
79 |
80 | For advanced usage, there are helper scripts in `scripts/`:
81 |
82 | ```bash
83 | # Run tests with various options:
84 | ./scripts/run_tests.sh # Basic test run
85 | ./scripts/run_tests.sh -c # With coverage
86 | ./scripts/run_tests.sh -s # With sanitizers
87 | ./scripts/run_tests.sh --clean -c # Clean build with coverage
88 |
89 | # Run benchmarks with various options:
90 | ./scripts/run_benchmarks.sh # Console output
91 | ./scripts/run_benchmarks.sh -f json # JSON output
92 | ./scripts/run_benchmarks.sh -f all -r 10 # All formats, 10 repetitions
93 | ./scripts/run_benchmarks.sh -p # Performance CPU mode
94 | ```
95 |
96 | ## Test Options
97 |
98 | CMake options for tests:
99 | - `ENABLE_COVERAGE=ON` - Enable code coverage reporting
100 | - `ENABLE_SANITIZERS=ON` - Enable address & undefined behavior sanitizers
101 |
102 | Example:
103 | ```bash
104 | cmake -DCMAKE_BUILD_TYPE=Debug -DENABLE_COVERAGE=ON ..
105 | ```
106 |
107 | ## Key Points
108 |
109 | ✅ **All separate test files compile into ONE executable** (`Test`)
110 | ✅ **All separate benchmark files compile into ONE executable** (`Benchmark`)
111 | ✅ **CMake handles combining them** - you don't need to do anything special
112 | ✅ **Run from parent directory** (testing/ or benchmarking/) so tests can find data files
113 |
--------------------------------------------------------------------------------
/docs/html/files.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | stevensStringLib: File List
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 | stevensStringLib 1.0
25 |
26 | An easy-to-use C++ library with convenient functions for working with strings
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
39 |
40 |
41 |
49 |
50 |
51 |
52 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
Loading...
65 |
Searching...
66 |
No Matches
67 |
68 |
69 |
70 |
71 |
72 |
75 |
76 |
Here is a list of all documented files with brief descriptions:
77 |
78 | stevensStringLib.h An easy-to-use C++ library with convenient functions for working with strings
79 |
80 |
81 |
82 |
83 |
86 |
87 |
88 |
--------------------------------------------------------------------------------
/benchmarking/build/CMakeFiles/CMakeError.log:
--------------------------------------------------------------------------------
1 | Performing C++ SOURCE FILE Test HAVE_CXX_FLAG_WSHORTEN_64_TO_32 failed with the following output:
2 | Change Dir: /home/jeff/cppLibs/stevensStringLib/benchmarking/build/CMakeFiles/CMakeTmp
3 |
4 | Run Build Command(s):/usr/bin/gmake -f Makefile cmTC_4d362/fast && /usr/bin/gmake -f CMakeFiles/cmTC_4d362.dir/build.make CMakeFiles/cmTC_4d362.dir/build
5 | gmake[1]: Entering directory '/home/jeff/cppLibs/stevensStringLib/benchmarking/build/CMakeFiles/CMakeTmp'
6 | Building CXX object CMakeFiles/cmTC_4d362.dir/src.cxx.o
7 | /usr/bin/c++ -DHAVE_CXX_FLAG_WSHORTEN_64_TO_32 -Wall -Wextra -Wshadow -Wfloat-equal -Wold-style-cast -Werror -Wsuggest-override -pedantic -pedantic-errors -Wshorten-64-to-32 -Wshorten-64-to-32 -std=c++11 -o CMakeFiles/cmTC_4d362.dir/src.cxx.o -c /home/jeff/cppLibs/stevensStringLib/benchmarking/build/CMakeFiles/CMakeTmp/src.cxx
8 | c++: error: unrecognized command-line option '-Wshorten-64-to-32'
9 | c++: error: unrecognized command-line option '-Wshorten-64-to-32'
10 | gmake[1]: *** [CMakeFiles/cmTC_4d362.dir/build.make:78: CMakeFiles/cmTC_4d362.dir/src.cxx.o] Error 1
11 | gmake[1]: Leaving directory '/home/jeff/cppLibs/stevensStringLib/benchmarking/build/CMakeFiles/CMakeTmp'
12 | gmake: *** [Makefile:127: cmTC_4d362/fast] Error 2
13 |
14 |
15 | Source file was:
16 | int main() { return 0; }
17 | Performing C++ SOURCE FILE Test HAVE_CXX_FLAG_WD654 failed with the following output:
18 | Change Dir: /home/jeff/cppLibs/stevensStringLib/benchmarking/build/CMakeFiles/CMakeTmp
19 |
20 | Run Build Command(s):/usr/bin/gmake -f Makefile cmTC_89aa4/fast && /usr/bin/gmake -f CMakeFiles/cmTC_89aa4.dir/build.make CMakeFiles/cmTC_89aa4.dir/build
21 | gmake[1]: Entering directory '/home/jeff/cppLibs/stevensStringLib/benchmarking/build/CMakeFiles/CMakeTmp'
22 | Building CXX object CMakeFiles/cmTC_89aa4.dir/src.cxx.o
23 | /usr/bin/c++ -DHAVE_CXX_FLAG_WD654 -Wall -Wextra -Wshadow -Wfloat-equal -Wold-style-cast -Werror -Wsuggest-override -pedantic -pedantic-errors -fstrict-aliasing -Wno-deprecated-declarations -Wno-deprecated -Wstrict-aliasing -wd654 -wd654 -std=c++11 -o CMakeFiles/cmTC_89aa4.dir/src.cxx.o -c /home/jeff/cppLibs/stevensStringLib/benchmarking/build/CMakeFiles/CMakeTmp/src.cxx
24 | c++: error: unrecognized command-line option '-wd654'
25 | c++: error: unrecognized command-line option '-wd654'
26 | gmake[1]: *** [CMakeFiles/cmTC_89aa4.dir/build.make:78: CMakeFiles/cmTC_89aa4.dir/src.cxx.o] Error 1
27 | gmake[1]: Leaving directory '/home/jeff/cppLibs/stevensStringLib/benchmarking/build/CMakeFiles/CMakeTmp'
28 | gmake: *** [Makefile:127: cmTC_89aa4/fast] Error 2
29 |
30 |
31 | Source file was:
32 | int main() { return 0; }
33 | Performing C++ SOURCE FILE Test HAVE_CXX_FLAG_WTHREAD_SAFETY failed with the following output:
34 | Change Dir: /home/jeff/cppLibs/stevensStringLib/benchmarking/build/CMakeFiles/CMakeTmp
35 |
36 | Run Build Command(s):/usr/bin/gmake -f Makefile cmTC_e7928/fast && /usr/bin/gmake -f CMakeFiles/cmTC_e7928.dir/build.make CMakeFiles/cmTC_e7928.dir/build
37 | gmake[1]: Entering directory '/home/jeff/cppLibs/stevensStringLib/benchmarking/build/CMakeFiles/CMakeTmp'
38 | Building CXX object CMakeFiles/cmTC_e7928.dir/src.cxx.o
39 | /usr/bin/c++ -DHAVE_CXX_FLAG_WTHREAD_SAFETY -Wall -Wextra -Wshadow -Wfloat-equal -Wold-style-cast -Werror -Wsuggest-override -pedantic -pedantic-errors -fstrict-aliasing -Wno-deprecated-declarations -Wno-deprecated -Wstrict-aliasing -Wthread-safety -Wthread-safety -std=c++11 -o CMakeFiles/cmTC_e7928.dir/src.cxx.o -c /home/jeff/cppLibs/stevensStringLib/benchmarking/build/CMakeFiles/CMakeTmp/src.cxx
40 | c++: error: unrecognized command-line option '-Wthread-safety'
41 | c++: error: unrecognized command-line option '-Wthread-safety'
42 | gmake[1]: *** [CMakeFiles/cmTC_e7928.dir/build.make:78: CMakeFiles/cmTC_e7928.dir/src.cxx.o] Error 1
43 | gmake[1]: Leaving directory '/home/jeff/cppLibs/stevensStringLib/benchmarking/build/CMakeFiles/CMakeTmp'
44 | gmake: *** [Makefile:127: cmTC_e7928/fast] Error 2
45 |
46 |
47 | Source file was:
48 | int main() { return 0; }
49 |
--------------------------------------------------------------------------------
/docs/html/pages.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | stevensStringLib: Related Pages
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 | stevensStringLib 1.0
25 |
26 | An easy-to-use C++ library with convenient functions for working with strings
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
39 |
40 |
41 |
49 |
50 |
51 |
52 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
Loading...
65 |
Searching...
66 |
No Matches
67 |
68 |
69 |
70 |
71 |
72 |
75 |
76 |
Here is a list of all related documentation pages:
82 |
83 |
84 |
87 |
88 |
89 |
--------------------------------------------------------------------------------
/benchmarking/benchmarks/benchmark_validation.cpp:
--------------------------------------------------------------------------------
1 | /**
2 | * @file benchmark_validation.cpp
3 | * @brief Benchmarks for validation functions
4 | */
5 |
6 | #include
7 | #include
8 | #include "../../stevensStringLib.h"
9 |
10 | // ============================================================================
11 | // BASELINE - Using std::regex
12 | // ============================================================================
13 |
14 | static void IsInteger_Baseline_Regex(benchmark::State& state) {
15 | std::string input = "123456";
16 | std::regex int_regex("^[+-]?[0-9]+$");
17 |
18 | for (auto _ : state) {
19 | bool result = std::regex_match(input, int_regex);
20 | benchmark::DoNotOptimize(result);
21 | }
22 | }
23 | BENCHMARK(IsInteger_Baseline_Regex);
24 |
25 | // ============================================================================
26 | // LIBRARY BENCHMARKS - isInteger
27 | // ============================================================================
28 |
29 | static void IsInteger_Library_Valid(benchmark::State& state) {
30 | std::string input = "123456";
31 |
32 | for (auto _ : state) {
33 | bool result = stevensStringLib::isInteger(input);
34 | benchmark::DoNotOptimize(result);
35 | }
36 | }
37 | BENCHMARK(IsInteger_Library_Valid);
38 |
39 | static void IsInteger_Library_Invalid(benchmark::State& state) {
40 | std::string input = "123.456";
41 |
42 | for (auto _ : state) {
43 | bool result = stevensStringLib::isInteger(input);
44 | benchmark::DoNotOptimize(result);
45 | }
46 | }
47 | BENCHMARK(IsInteger_Library_Invalid);
48 |
49 | // ============================================================================
50 | // LIBRARY BENCHMARKS - isFloat
51 | // ============================================================================
52 |
53 | static void IsFloat_Library_Valid(benchmark::State& state) {
54 | std::string input = "123.456";
55 |
56 | for (auto _ : state) {
57 | bool result = stevensStringLib::isFloat(input);
58 | benchmark::DoNotOptimize(result);
59 | }
60 | }
61 | BENCHMARK(IsFloat_Library_Valid);
62 |
63 | static void IsFloat_Library_Scientific(benchmark::State& state) {
64 | std::string input = "1.23e-10";
65 |
66 | for (auto _ : state) {
67 | bool result = stevensStringLib::isFloat(input);
68 | benchmark::DoNotOptimize(result);
69 | }
70 | }
71 | BENCHMARK(IsFloat_Library_Scientific);
72 |
73 | // ============================================================================
74 | // LIBRARY BENCHMARKS - isNumber
75 | // ============================================================================
76 |
77 | static void IsNumber_Library(benchmark::State& state) {
78 | std::string input = "123.456";
79 |
80 | for (auto _ : state) {
81 | bool result = stevensStringLib::isNumber(input);
82 | benchmark::DoNotOptimize(result);
83 | }
84 | }
85 | BENCHMARK(IsNumber_Library);
86 |
87 | // ============================================================================
88 | // SCALING - Input length impact
89 | // ============================================================================
90 |
91 | static void IsInteger_Scaling(benchmark::State& state) {
92 | size_t num_digits = state.range(0);
93 | std::string input(num_digits, '9'); // String of 9s
94 |
95 | for (auto _ : state) {
96 | bool result = stevensStringLib::isInteger(input);
97 | benchmark::DoNotOptimize(result);
98 | }
99 |
100 | state.SetComplexityN(num_digits);
101 | }
102 | BENCHMARK(IsInteger_Scaling)
103 | ->RangeMultiplier(2)
104 | ->Range(1, 1<<10)
105 | ->Complexity();
106 |
107 | // ============================================================================
108 | // REAL WORLD - Mixed validation
109 | // ============================================================================
110 |
111 | static void Validation_MixedInputs(benchmark::State& state) {
112 | std::vector inputs = {
113 | "123", "456.789", "1.23e10", "not_a_number",
114 | "-999", "0.0", "invalid", "42"
115 | };
116 | size_t idx = 0;
117 |
118 | for (auto _ : state) {
119 | auto& input = inputs[idx % inputs.size()];
120 | bool result = stevensStringLib::isNumber(input);
121 | benchmark::DoNotOptimize(result);
122 | ++idx;
123 | }
124 | }
125 | BENCHMARK(Validation_MixedInputs);
126 |
--------------------------------------------------------------------------------
/docs/html/deprecated.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | stevensStringLib: Deprecated List
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 | stevensStringLib 1.0
25 |
26 | An easy-to-use C++ library with convenient functions for working with strings
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
39 |
40 |
41 |
49 |
50 |
51 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
Loading...
64 |
Searching...
65 |
No Matches
66 |
67 |
68 |
69 |
70 |
71 |
72 |
75 |
76 |
77 | Member stevensStringLib::contains (const std::string_view &str, const std::string_view &substring)
78 | In C++23 and onward, please use the std::string::contains() method instead of this function.
79 | Member stevensStringLib::contains (const std::string_view &str, const char ch)
80 | In C++23 and onward, please use the std::string::contains() method instead of this function.
81 | Member stevensStringLib::startsWith (const std::string_view &str, const std::string_view &substr)
82 | In C++20 and onward, please use std::string.starts_with instead.
83 |
84 |
85 |
86 |
87 |
90 |
91 |
92 |
--------------------------------------------------------------------------------
/testing/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | cmake_minimum_required(VERSION 3.22.1)
2 |
3 | project(Test C CXX)
4 |
5 | # ============================================================================
6 | # Compiler Settings
7 | # ============================================================================
8 |
9 | # GoogleTest requires at least C++14, and stevensStringLib requires C++17
10 | set(CMAKE_C_STANDARD 99)
11 | set(CMAKE_CXX_STANDARD 17)
12 | set(CMAKE_CXX_STANDARD_REQUIRED ON)
13 |
14 | # ============================================================================
15 | # Build Options
16 | # ============================================================================
17 |
18 | option(ENABLE_COVERAGE "Enable code coverage reporting" OFF)
19 | option(ENABLE_SANITIZERS "Enable address and undefined behavior sanitizers" OFF)
20 |
21 | # ============================================================================
22 | # Add GoogleTest - Using FetchContent (no submodules needed!)
23 | # ============================================================================
24 |
25 | include(FetchContent)
26 |
27 | message(STATUS "Fetching Google Test...")
28 | FetchContent_Declare(
29 | googletest
30 | GIT_REPOSITORY https://github.com/google/googletest.git
31 | GIT_TAG v1.14.0 # Latest stable release
32 | GIT_SHALLOW TRUE # Only download latest commit
33 | FIND_PACKAGE_ARGS NAMES GTest
34 | )
35 |
36 | # Prevent GoogleTest from overriding compiler/linker options
37 | set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
38 |
39 | # Make GoogleTest available
40 | FetchContent_MakeAvailable(googletest)
41 |
42 | # GoogleTest module (for gtest_main)
43 |
44 | # ============================================================================
45 | # Test Source Files - New Modular Structure
46 | # ============================================================================
47 |
48 | set(TEST_SOURCES
49 | unit/string_validation_test.cpp
50 | unit/string_manipulation_test.cpp
51 | unit/string_searching_test.cpp
52 | unit/string_conversion_test.cpp
53 | unit/property_based_test.cpp
54 | )
55 |
56 | # ============================================================================
57 | # Create Test Executable
58 | # ============================================================================
59 |
60 | add_executable(${PROJECT_NAME} ${TEST_SOURCES})
61 |
62 | target_include_directories(${PROJECT_NAME} PRIVATE
63 | ${CMAKE_CURRENT_SOURCE_DIR}
64 | ${CMAKE_CURRENT_SOURCE_DIR}/..
65 | )
66 |
67 | target_link_libraries(${PROJECT_NAME} PRIVATE
68 | gtest_main
69 | )
70 |
71 | # ============================================================================
72 | # Code Coverage Configuration
73 | # ============================================================================
74 |
75 | if(ENABLE_COVERAGE)
76 | message(STATUS "Code coverage enabled")
77 |
78 | if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
79 | target_compile_options(${PROJECT_NAME} PRIVATE
80 | --coverage
81 | -fprofile-arcs
82 | -ftest-coverage
83 | -O0 # Disable optimizations for accurate coverage
84 | -g # Include debug info
85 | )
86 |
87 | target_link_options(${PROJECT_NAME} PRIVATE
88 | --coverage
89 | )
90 | else()
91 | message(WARNING "Code coverage is only supported with GCC or Clang")
92 | endif()
93 | endif()
94 |
95 | # ============================================================================
96 | # Sanitizers Configuration
97 | # ============================================================================
98 |
99 | if(ENABLE_SANITIZERS)
100 | message(STATUS "Sanitizers enabled (address, undefined behavior)")
101 |
102 | if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
103 | target_compile_options(${PROJECT_NAME} PRIVATE
104 | -fsanitize=address
105 | -fsanitize=undefined
106 | -fno-omit-frame-pointer
107 | -g
108 | )
109 |
110 | target_link_options(${PROJECT_NAME} PRIVATE
111 | -fsanitize=address
112 | -fsanitize=undefined
113 | )
114 | else()
115 | message(WARNING "Sanitizers are only supported with GCC or Clang")
116 | endif()
117 | endif()
118 |
119 | # ============================================================================
120 | # Tests can be run directly - no CTest integration needed
121 | # ============================================================================
122 | # Just run: ./Test
123 |
124 |
125 | # ============================================================================
126 | # Print Configuration Summary
127 | # ============================================================================
128 |
129 | message(STATUS "")
130 | message(STATUS "=== Test Configuration Summary ===")
131 | message(STATUS "Build type: ${CMAKE_BUILD_TYPE}")
132 | message(STATUS "C++ Standard: ${CMAKE_CXX_STANDARD}")
133 | message(STATUS "Code Coverage: ${ENABLE_COVERAGE}")
134 | message(STATUS "Sanitizers: ${ENABLE_SANITIZERS}")
135 | message(STATUS "===================================")
136 | message(STATUS "")
137 |
--------------------------------------------------------------------------------
/benchmarking/benchmarks/benchmark_join.cpp:
--------------------------------------------------------------------------------
1 | /**
2 | * @file benchmark_join.cpp
3 | * @brief Comprehensive benchmarks for join() function
4 | */
5 |
6 | #include
7 | #include
8 | #include "../../stevensStringLib.h"
9 |
10 | // ============================================================================
11 | // BASELINE BENCHMARKS
12 | // ============================================================================
13 |
14 | static void Join_Baseline_Accumulate(benchmark::State& state) {
15 | std::vector vec = {"apple", "banana", "cherry", "date", "elderberry"};
16 | std::string separator = ", ";
17 |
18 | for (auto _ : state) {
19 | std::string result;
20 | for(size_t i = 0; i < vec.size(); ++i) {
21 | if(i > 0) result += separator;
22 | result += vec[i];
23 | }
24 | benchmark::DoNotOptimize(result);
25 | }
26 | }
27 | BENCHMARK(Join_Baseline_Accumulate);
28 |
29 | // ============================================================================
30 | // LIBRARY BENCHMARKS
31 | // ============================================================================
32 |
33 | static void Join_Library_Small(benchmark::State& state) {
34 | std::vector vec = {"apple", "banana", "cherry", "date", "elderberry"};
35 | std::string separator = ", ";
36 |
37 | for (auto _ : state) {
38 | auto result = stevensStringLib::join(vec, separator);
39 | benchmark::DoNotOptimize(result);
40 | }
41 | }
42 | BENCHMARK(Join_Library_Small);
43 |
44 | // ============================================================================
45 | // SCALING TESTS
46 | // ============================================================================
47 |
48 | static void Join_Scaling(benchmark::State& state) {
49 | size_t num_elements = state.range(0);
50 |
51 | // Generate vector with N elements
52 | std::vector vec;
53 | vec.reserve(num_elements);
54 | for(size_t i = 0; i < num_elements; ++i) {
55 | vec.push_back("element" + std::to_string(i));
56 | }
57 |
58 | for (auto _ : state) {
59 | auto result = stevensStringLib::join(vec, ",");
60 | benchmark::DoNotOptimize(result);
61 | }
62 |
63 | state.SetComplexityN(num_elements);
64 | state.SetItemsProcessed(state.iterations() * num_elements);
65 | }
66 | BENCHMARK(Join_Scaling)
67 | ->RangeMultiplier(2)
68 | ->Range(8, 8<<10)
69 | ->Complexity(benchmark::oN);
70 |
71 | // ============================================================================
72 | // WORST CASE - Many empty strings
73 | // ============================================================================
74 |
75 | static void Join_WorstCase_EmptyStrings(benchmark::State& state) {
76 | size_t num_elements = state.range(0);
77 | std::vector vec(num_elements, ""); // All empty
78 |
79 | for (auto _ : state) {
80 | auto result = stevensStringLib::join(vec, ",");
81 | benchmark::DoNotOptimize(result);
82 | }
83 | }
84 | BENCHMARK(Join_WorstCase_EmptyStrings)
85 | ->Range(8, 8<<10);
86 |
87 | // ============================================================================
88 | // SEPARATOR LENGTH IMPACT
89 | // ============================================================================
90 |
91 | static void Join_LongSeparator(benchmark::State& state) {
92 | std::vector vec = {"a", "b", "c", "d", "e", "f", "g", "h", "i", "j"};
93 | std::string long_sep = " --- separator --- ";
94 |
95 | for (auto _ : state) {
96 | auto result = stevensStringLib::join(vec, long_sep);
97 | benchmark::DoNotOptimize(result);
98 | }
99 | }
100 | BENCHMARK(Join_LongSeparator);
101 |
102 | static void Join_ShortSeparator(benchmark::State& state) {
103 | std::vector vec = {"a", "b", "c", "d", "e", "f", "g", "h", "i", "j"};
104 |
105 | for (auto _ : state) {
106 | auto result = stevensStringLib::join(vec, ",");
107 | benchmark::DoNotOptimize(result);
108 | }
109 | }
110 | BENCHMARK(Join_ShortSeparator);
111 |
112 | // ============================================================================
113 | // REAL WORLD - CSV generation
114 | // ============================================================================
115 |
116 | static void Join_CSV_RealWorld(benchmark::State& state) {
117 | std::vector record = {
118 | "John", "Doe", "john.doe@email.com", "555-1234",
119 | "123 Main St", "New York", "NY", "10001"
120 | };
121 |
122 | for (auto _ : state) {
123 | auto result = stevensStringLib::join(record, ",");
124 | benchmark::DoNotOptimize(result);
125 | }
126 | }
127 | BENCHMARK(Join_CSV_RealWorld);
128 |
129 | // ============================================================================
130 | // ROUNDTRIP - separate then join
131 | // ============================================================================
132 |
133 | static void Join_Roundtrip(benchmark::State& state) {
134 | std::string original = "apple,banana,cherry,date,elderberry,fig,grape";
135 |
136 | for (auto _ : state) {
137 | auto separated = stevensStringLib::separate(original, ',');
138 | auto rejoined = stevensStringLib::join(separated, ",");
139 | benchmark::DoNotOptimize(rejoined);
140 | }
141 | }
142 | BENCHMARK(Join_Roundtrip);
143 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # stevensStringLib
2 | 
3 |
4 |
5 |
6 | Welcome! StevensStringLib is a string library for the rest of us who just want working with strings in C++ to be easier.
7 | We have lots of convenient functions for manipulating and processing strings. Check them out below!
8 |
9 | # Simple installation and usage:
10 | You can use this string library with the Beldum Package Manager:
11 |
12 | ## Install
13 | Import "stevensStringLib.h" into your own project
14 |
15 | or
16 |
17 | ### Beldum Package Manager: https://github.com/Nord-Tech-Systems-LLC/beldum_package_manager
18 | ```
19 | mkdir new_project
20 | cd new_project
21 | beldum init
22 | beldum install stevensStringLib
23 | ```
24 |
25 | ## Usage
26 | `src/main.cpp`
27 | ```cpp
28 |
29 | #include "stevensStringLib.h"
30 |
31 | int main()
32 | {
33 | stevensStringLib::containsOnly("111011112222", "12");
34 | return 0;
35 | }
36 |
37 |
38 | ```
39 |
40 |
41 |
42 | ## Demo
43 | #### Separate a string:
44 | ```
45 | std::string myString = "Charmander,Squirtle,Bulbasaur";
46 |
47 | std::vector myVector = stevensStringLib::separate(myString, ',');
48 |
49 | // myVector == {"Charmander, "Squirtle", "Bulbasaur"};
50 | ```
51 |
52 | #### Remove all whitespace from a string:
53 | ```
54 | std::string data = " Flowers,\nRamona, Toronto\r,Canada\t,212-664-7665 "
55 |
56 | std::string cleanData = stevensStringLib::removeWhitespace(data);
57 |
58 | // cleanData = "Flowers,Ramona,Toronto,Canada,212-664-7665"
59 | ```
60 |
61 | #### Wrap a string to a certain width:
62 | ```
63 | std::string textToWrap = "111222333";
64 |
65 | std::string wrappedText = stevensStringLib::wrapToWidth(textToWrap, 3);
66 |
67 | // wrappedText == "111\n222\n333\n";
68 | ```
69 |
70 |
71 | ## Requirements
72 |
73 | To use the library: C++ 17
74 |
75 | If you'd like to build the test or benchmark files: CMake 3.22.1
76 |
77 |
78 | ## Easy Installation!
79 |
80 | To get started, you can copy and paste the `stevensStringLib.h` file into your project's folder.
81 |
82 | Then you should add an include statement at the top of the .cpp file you would like to use the library in.
83 | Make sure to NOT include the { } characters in your statement.
84 |
85 | ```
86 | #include "{insert relative path from file to the library here}stevensStringLib.h"
87 | ```
88 |
89 | For example, if `stevensStringLib.h` is in the same folder as your .cpp file, then it would look like this:
90 |
91 | ```
92 | #include "stevensStringLib.h"
93 | ```
94 |
95 | In your .cpp file you can give the library namespace a different name if you'd rather not keep typing `stevensStringLib`:
96 |
97 | ```
98 | namespace strlib = stevensStringLib;
99 | ```
100 |
101 | And then you're good to go!
102 |
103 | ```
104 | std::vector words = strlib::separate("Hello world!, ' ');
105 | ```
106 |
107 |
108 |
109 | ## Documentation
110 |
111 | The documentation for this library is written to a series of offline webpages that can be viewed by clicking the "Open Documation" link in the `docs` folder. This documentation was generated by [Doxygen][4].
112 |
113 | If you're viewing this README file as one of the Doxygen webpages, you can view the list of functions and all of their documentation by clicking here: stevensStringLib.h.
114 |
115 | ## Testing
116 |
117 | stevensStringLib contains a suite of tests to validate its functionality within the `testing` folder. All testing is carried out with [Google Test][5].
118 |
119 |
120 | To run these tests on your computer, you should use the cmake tool in the `testing` folder by running the command `cmake -S . -B ./build`.
121 | This will generate an makefile to create an executable in the `testing/build` folder. Then, go to the `testing/build` folder and run the command `make`.
122 | Once you have done this, you should have an executable named `stevensStringLibTest` in the `testing/build` folder which you can run the tests with.
123 |
124 | ## Benchmarking
125 |
126 | stevensStringLib also contains benchmarking so you can see how fast and efficient its functions are in the `benchmarking` folder. All benchmarking is carried out with [Google Benchmark][6].
127 |
128 |
129 | To run the benchmark on your computer, the process of creating the benchmark executable works very much the same way as the test executable: you should use the cmake tool in the `benchmarking` folder by running the command `cmake -S . -B ./build`.
130 | This will generate a makefile to create an executable in the `benchmarking/build` folder. Then, go to the `benchmarking/build` folder and run the command `make`. Once you have done this, you should have an executable named `stevensStringLibBenchmark` in the `benchmarking/build` folder which you can run to benchmark the library.
131 |
132 |
133 | ## Special Thanks
134 |
135 | Julien Jorge for [his detailed code review][1]
136 |
137 | [r/cpp][2] for their collective critiques and contributions
138 |
139 | Rhymu for his [guide][3] on using CMake to link GoogleTest with a unit test program
140 |
141 |
142 |
143 | [1]: https://julien.jorge.st/posts/en/so-you-asked-for-feedback-stevensstringlib/
144 |
145 | [2]: https://www.reddit.com/r/cpp/comments/18hlkgd/working_on_an_easytouse_c_string_library/
146 |
147 | [3]: https://www.youtube.com/watch?v=Lp1ifh9TuFI
148 |
149 | [4]: https://www.doxygen.nl/index.html
150 |
151 | [5]: https://github.com/google/googletest
152 |
153 | [6]: https://github.com/google/benchmark
--------------------------------------------------------------------------------
/testing/build/CMakeFiles/3.22.1/CMakeCXXCompiler.cmake:
--------------------------------------------------------------------------------
1 | set(CMAKE_CXX_COMPILER "/usr/bin/c++")
2 | set(CMAKE_CXX_COMPILER_ARG1 "")
3 | set(CMAKE_CXX_COMPILER_ID "GNU")
4 | set(CMAKE_CXX_COMPILER_VERSION "11.4.0")
5 | set(CMAKE_CXX_COMPILER_VERSION_INTERNAL "")
6 | set(CMAKE_CXX_COMPILER_WRAPPER "")
7 | set(CMAKE_CXX_STANDARD_COMPUTED_DEFAULT "17")
8 | set(CMAKE_CXX_EXTENSIONS_COMPUTED_DEFAULT "ON")
9 | set(CMAKE_CXX_COMPILE_FEATURES "cxx_std_98;cxx_template_template_parameters;cxx_std_11;cxx_alias_templates;cxx_alignas;cxx_alignof;cxx_attributes;cxx_auto_type;cxx_constexpr;cxx_decltype;cxx_decltype_incomplete_return_types;cxx_default_function_template_args;cxx_defaulted_functions;cxx_defaulted_move_initializers;cxx_delegating_constructors;cxx_deleted_functions;cxx_enum_forward_declarations;cxx_explicit_conversions;cxx_extended_friend_declarations;cxx_extern_templates;cxx_final;cxx_func_identifier;cxx_generalized_initializers;cxx_inheriting_constructors;cxx_inline_namespaces;cxx_lambdas;cxx_local_type_template_args;cxx_long_long_type;cxx_noexcept;cxx_nonstatic_member_init;cxx_nullptr;cxx_override;cxx_range_for;cxx_raw_string_literals;cxx_reference_qualified_functions;cxx_right_angle_brackets;cxx_rvalue_references;cxx_sizeof_member;cxx_static_assert;cxx_strong_enums;cxx_thread_local;cxx_trailing_return_types;cxx_unicode_literals;cxx_uniform_initialization;cxx_unrestricted_unions;cxx_user_literals;cxx_variadic_macros;cxx_variadic_templates;cxx_std_14;cxx_aggregate_default_initializers;cxx_attribute_deprecated;cxx_binary_literals;cxx_contextual_conversions;cxx_decltype_auto;cxx_digit_separators;cxx_generic_lambdas;cxx_lambda_init_captures;cxx_relaxed_constexpr;cxx_return_type_deduction;cxx_variable_templates;cxx_std_17;cxx_std_20;cxx_std_23")
10 | set(CMAKE_CXX98_COMPILE_FEATURES "cxx_std_98;cxx_template_template_parameters")
11 | set(CMAKE_CXX11_COMPILE_FEATURES "cxx_std_11;cxx_alias_templates;cxx_alignas;cxx_alignof;cxx_attributes;cxx_auto_type;cxx_constexpr;cxx_decltype;cxx_decltype_incomplete_return_types;cxx_default_function_template_args;cxx_defaulted_functions;cxx_defaulted_move_initializers;cxx_delegating_constructors;cxx_deleted_functions;cxx_enum_forward_declarations;cxx_explicit_conversions;cxx_extended_friend_declarations;cxx_extern_templates;cxx_final;cxx_func_identifier;cxx_generalized_initializers;cxx_inheriting_constructors;cxx_inline_namespaces;cxx_lambdas;cxx_local_type_template_args;cxx_long_long_type;cxx_noexcept;cxx_nonstatic_member_init;cxx_nullptr;cxx_override;cxx_range_for;cxx_raw_string_literals;cxx_reference_qualified_functions;cxx_right_angle_brackets;cxx_rvalue_references;cxx_sizeof_member;cxx_static_assert;cxx_strong_enums;cxx_thread_local;cxx_trailing_return_types;cxx_unicode_literals;cxx_uniform_initialization;cxx_unrestricted_unions;cxx_user_literals;cxx_variadic_macros;cxx_variadic_templates")
12 | set(CMAKE_CXX14_COMPILE_FEATURES "cxx_std_14;cxx_aggregate_default_initializers;cxx_attribute_deprecated;cxx_binary_literals;cxx_contextual_conversions;cxx_decltype_auto;cxx_digit_separators;cxx_generic_lambdas;cxx_lambda_init_captures;cxx_relaxed_constexpr;cxx_return_type_deduction;cxx_variable_templates")
13 | set(CMAKE_CXX17_COMPILE_FEATURES "cxx_std_17")
14 | set(CMAKE_CXX20_COMPILE_FEATURES "cxx_std_20")
15 | set(CMAKE_CXX23_COMPILE_FEATURES "cxx_std_23")
16 |
17 | set(CMAKE_CXX_PLATFORM_ID "Linux")
18 | set(CMAKE_CXX_SIMULATE_ID "")
19 | set(CMAKE_CXX_COMPILER_FRONTEND_VARIANT "")
20 | set(CMAKE_CXX_SIMULATE_VERSION "")
21 |
22 |
23 |
24 |
25 | set(CMAKE_AR "/usr/bin/ar")
26 | set(CMAKE_CXX_COMPILER_AR "/usr/bin/gcc-ar-11")
27 | set(CMAKE_RANLIB "/usr/bin/ranlib")
28 | set(CMAKE_CXX_COMPILER_RANLIB "/usr/bin/gcc-ranlib-11")
29 | set(CMAKE_LINKER "/usr/bin/ld")
30 | set(CMAKE_MT "")
31 | set(CMAKE_COMPILER_IS_GNUCXX 1)
32 | set(CMAKE_CXX_COMPILER_LOADED 1)
33 | set(CMAKE_CXX_COMPILER_WORKS TRUE)
34 | set(CMAKE_CXX_ABI_COMPILED TRUE)
35 |
36 | set(CMAKE_CXX_COMPILER_ENV_VAR "CXX")
37 |
38 | set(CMAKE_CXX_COMPILER_ID_RUN 1)
39 | set(CMAKE_CXX_SOURCE_FILE_EXTENSIONS C;M;c++;cc;cpp;cxx;m;mm;mpp;CPP;ixx;cppm)
40 | set(CMAKE_CXX_IGNORE_EXTENSIONS inl;h;hpp;HPP;H;o;O;obj;OBJ;def;DEF;rc;RC)
41 |
42 | foreach (lang C OBJC OBJCXX)
43 | if (CMAKE_${lang}_COMPILER_ID_RUN)
44 | foreach(extension IN LISTS CMAKE_${lang}_SOURCE_FILE_EXTENSIONS)
45 | list(REMOVE_ITEM CMAKE_CXX_SOURCE_FILE_EXTENSIONS ${extension})
46 | endforeach()
47 | endif()
48 | endforeach()
49 |
50 | set(CMAKE_CXX_LINKER_PREFERENCE 30)
51 | set(CMAKE_CXX_LINKER_PREFERENCE_PROPAGATES 1)
52 |
53 | # Save compiler ABI information.
54 | set(CMAKE_CXX_SIZEOF_DATA_PTR "8")
55 | set(CMAKE_CXX_COMPILER_ABI "ELF")
56 | set(CMAKE_CXX_BYTE_ORDER "LITTLE_ENDIAN")
57 | set(CMAKE_CXX_LIBRARY_ARCHITECTURE "x86_64-linux-gnu")
58 |
59 | if(CMAKE_CXX_SIZEOF_DATA_PTR)
60 | set(CMAKE_SIZEOF_VOID_P "${CMAKE_CXX_SIZEOF_DATA_PTR}")
61 | endif()
62 |
63 | if(CMAKE_CXX_COMPILER_ABI)
64 | set(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_CXX_COMPILER_ABI}")
65 | endif()
66 |
67 | if(CMAKE_CXX_LIBRARY_ARCHITECTURE)
68 | set(CMAKE_LIBRARY_ARCHITECTURE "x86_64-linux-gnu")
69 | endif()
70 |
71 | set(CMAKE_CXX_CL_SHOWINCLUDES_PREFIX "")
72 | if(CMAKE_CXX_CL_SHOWINCLUDES_PREFIX)
73 | set(CMAKE_CL_SHOWINCLUDES_PREFIX "${CMAKE_CXX_CL_SHOWINCLUDES_PREFIX}")
74 | endif()
75 |
76 |
77 |
78 |
79 |
80 | set(CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES "/usr/include/c++/11;/usr/include/x86_64-linux-gnu/c++/11;/usr/include/c++/11/backward;/usr/lib/gcc/x86_64-linux-gnu/11/include;/usr/local/include;/usr/include/x86_64-linux-gnu;/usr/include")
81 | set(CMAKE_CXX_IMPLICIT_LINK_LIBRARIES "stdc++;m;gcc_s;gcc;c;gcc_s;gcc")
82 | set(CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES "/usr/lib/gcc/x86_64-linux-gnu/11;/usr/lib/x86_64-linux-gnu;/usr/lib;/lib/x86_64-linux-gnu;/lib")
83 | set(CMAKE_CXX_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "")
84 |
--------------------------------------------------------------------------------
/benchmarking/build/CMakeFiles/3.22.1/CMakeCXXCompiler.cmake:
--------------------------------------------------------------------------------
1 | set(CMAKE_CXX_COMPILER "/usr/bin/c++")
2 | set(CMAKE_CXX_COMPILER_ARG1 "")
3 | set(CMAKE_CXX_COMPILER_ID "GNU")
4 | set(CMAKE_CXX_COMPILER_VERSION "11.4.0")
5 | set(CMAKE_CXX_COMPILER_VERSION_INTERNAL "")
6 | set(CMAKE_CXX_COMPILER_WRAPPER "")
7 | set(CMAKE_CXX_STANDARD_COMPUTED_DEFAULT "17")
8 | set(CMAKE_CXX_EXTENSIONS_COMPUTED_DEFAULT "ON")
9 | set(CMAKE_CXX_COMPILE_FEATURES "cxx_std_98;cxx_template_template_parameters;cxx_std_11;cxx_alias_templates;cxx_alignas;cxx_alignof;cxx_attributes;cxx_auto_type;cxx_constexpr;cxx_decltype;cxx_decltype_incomplete_return_types;cxx_default_function_template_args;cxx_defaulted_functions;cxx_defaulted_move_initializers;cxx_delegating_constructors;cxx_deleted_functions;cxx_enum_forward_declarations;cxx_explicit_conversions;cxx_extended_friend_declarations;cxx_extern_templates;cxx_final;cxx_func_identifier;cxx_generalized_initializers;cxx_inheriting_constructors;cxx_inline_namespaces;cxx_lambdas;cxx_local_type_template_args;cxx_long_long_type;cxx_noexcept;cxx_nonstatic_member_init;cxx_nullptr;cxx_override;cxx_range_for;cxx_raw_string_literals;cxx_reference_qualified_functions;cxx_right_angle_brackets;cxx_rvalue_references;cxx_sizeof_member;cxx_static_assert;cxx_strong_enums;cxx_thread_local;cxx_trailing_return_types;cxx_unicode_literals;cxx_uniform_initialization;cxx_unrestricted_unions;cxx_user_literals;cxx_variadic_macros;cxx_variadic_templates;cxx_std_14;cxx_aggregate_default_initializers;cxx_attribute_deprecated;cxx_binary_literals;cxx_contextual_conversions;cxx_decltype_auto;cxx_digit_separators;cxx_generic_lambdas;cxx_lambda_init_captures;cxx_relaxed_constexpr;cxx_return_type_deduction;cxx_variable_templates;cxx_std_17;cxx_std_20;cxx_std_23")
10 | set(CMAKE_CXX98_COMPILE_FEATURES "cxx_std_98;cxx_template_template_parameters")
11 | set(CMAKE_CXX11_COMPILE_FEATURES "cxx_std_11;cxx_alias_templates;cxx_alignas;cxx_alignof;cxx_attributes;cxx_auto_type;cxx_constexpr;cxx_decltype;cxx_decltype_incomplete_return_types;cxx_default_function_template_args;cxx_defaulted_functions;cxx_defaulted_move_initializers;cxx_delegating_constructors;cxx_deleted_functions;cxx_enum_forward_declarations;cxx_explicit_conversions;cxx_extended_friend_declarations;cxx_extern_templates;cxx_final;cxx_func_identifier;cxx_generalized_initializers;cxx_inheriting_constructors;cxx_inline_namespaces;cxx_lambdas;cxx_local_type_template_args;cxx_long_long_type;cxx_noexcept;cxx_nonstatic_member_init;cxx_nullptr;cxx_override;cxx_range_for;cxx_raw_string_literals;cxx_reference_qualified_functions;cxx_right_angle_brackets;cxx_rvalue_references;cxx_sizeof_member;cxx_static_assert;cxx_strong_enums;cxx_thread_local;cxx_trailing_return_types;cxx_unicode_literals;cxx_uniform_initialization;cxx_unrestricted_unions;cxx_user_literals;cxx_variadic_macros;cxx_variadic_templates")
12 | set(CMAKE_CXX14_COMPILE_FEATURES "cxx_std_14;cxx_aggregate_default_initializers;cxx_attribute_deprecated;cxx_binary_literals;cxx_contextual_conversions;cxx_decltype_auto;cxx_digit_separators;cxx_generic_lambdas;cxx_lambda_init_captures;cxx_relaxed_constexpr;cxx_return_type_deduction;cxx_variable_templates")
13 | set(CMAKE_CXX17_COMPILE_FEATURES "cxx_std_17")
14 | set(CMAKE_CXX20_COMPILE_FEATURES "cxx_std_20")
15 | set(CMAKE_CXX23_COMPILE_FEATURES "cxx_std_23")
16 |
17 | set(CMAKE_CXX_PLATFORM_ID "Linux")
18 | set(CMAKE_CXX_SIMULATE_ID "")
19 | set(CMAKE_CXX_COMPILER_FRONTEND_VARIANT "")
20 | set(CMAKE_CXX_SIMULATE_VERSION "")
21 |
22 |
23 |
24 |
25 | set(CMAKE_AR "/usr/bin/ar")
26 | set(CMAKE_CXX_COMPILER_AR "/usr/bin/gcc-ar-11")
27 | set(CMAKE_RANLIB "/usr/bin/ranlib")
28 | set(CMAKE_CXX_COMPILER_RANLIB "/usr/bin/gcc-ranlib-11")
29 | set(CMAKE_LINKER "/usr/bin/ld")
30 | set(CMAKE_MT "")
31 | set(CMAKE_COMPILER_IS_GNUCXX 1)
32 | set(CMAKE_CXX_COMPILER_LOADED 1)
33 | set(CMAKE_CXX_COMPILER_WORKS TRUE)
34 | set(CMAKE_CXX_ABI_COMPILED TRUE)
35 |
36 | set(CMAKE_CXX_COMPILER_ENV_VAR "CXX")
37 |
38 | set(CMAKE_CXX_COMPILER_ID_RUN 1)
39 | set(CMAKE_CXX_SOURCE_FILE_EXTENSIONS C;M;c++;cc;cpp;cxx;m;mm;mpp;CPP;ixx;cppm)
40 | set(CMAKE_CXX_IGNORE_EXTENSIONS inl;h;hpp;HPP;H;o;O;obj;OBJ;def;DEF;rc;RC)
41 |
42 | foreach (lang C OBJC OBJCXX)
43 | if (CMAKE_${lang}_COMPILER_ID_RUN)
44 | foreach(extension IN LISTS CMAKE_${lang}_SOURCE_FILE_EXTENSIONS)
45 | list(REMOVE_ITEM CMAKE_CXX_SOURCE_FILE_EXTENSIONS ${extension})
46 | endforeach()
47 | endif()
48 | endforeach()
49 |
50 | set(CMAKE_CXX_LINKER_PREFERENCE 30)
51 | set(CMAKE_CXX_LINKER_PREFERENCE_PROPAGATES 1)
52 |
53 | # Save compiler ABI information.
54 | set(CMAKE_CXX_SIZEOF_DATA_PTR "8")
55 | set(CMAKE_CXX_COMPILER_ABI "ELF")
56 | set(CMAKE_CXX_BYTE_ORDER "LITTLE_ENDIAN")
57 | set(CMAKE_CXX_LIBRARY_ARCHITECTURE "x86_64-linux-gnu")
58 |
59 | if(CMAKE_CXX_SIZEOF_DATA_PTR)
60 | set(CMAKE_SIZEOF_VOID_P "${CMAKE_CXX_SIZEOF_DATA_PTR}")
61 | endif()
62 |
63 | if(CMAKE_CXX_COMPILER_ABI)
64 | set(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_CXX_COMPILER_ABI}")
65 | endif()
66 |
67 | if(CMAKE_CXX_LIBRARY_ARCHITECTURE)
68 | set(CMAKE_LIBRARY_ARCHITECTURE "x86_64-linux-gnu")
69 | endif()
70 |
71 | set(CMAKE_CXX_CL_SHOWINCLUDES_PREFIX "")
72 | if(CMAKE_CXX_CL_SHOWINCLUDES_PREFIX)
73 | set(CMAKE_CL_SHOWINCLUDES_PREFIX "${CMAKE_CXX_CL_SHOWINCLUDES_PREFIX}")
74 | endif()
75 |
76 |
77 |
78 |
79 |
80 | set(CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES "/usr/include/c++/11;/usr/include/x86_64-linux-gnu/c++/11;/usr/include/c++/11/backward;/usr/lib/gcc/x86_64-linux-gnu/11/include;/usr/local/include;/usr/include/x86_64-linux-gnu;/usr/include")
81 | set(CMAKE_CXX_IMPLICIT_LINK_LIBRARIES "stdc++;m;gcc_s;gcc;c;gcc_s;gcc")
82 | set(CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES "/usr/lib/gcc/x86_64-linux-gnu/11;/usr/lib/x86_64-linux-gnu;/usr/lib;/lib/x86_64-linux-gnu;/lib")
83 | set(CMAKE_CXX_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "")
84 |
--------------------------------------------------------------------------------
/QUICK_START.md:
--------------------------------------------------------------------------------
1 | # Quick Start Guide
2 |
3 | Get up and running with stevensStringLib testing and benchmarking in 5 minutes.
4 |
5 | ## Prerequisites
6 |
7 | ```bash
8 | # Install dependencies
9 | sudo apt-get update
10 | sudo apt-get install -y cmake g++ lcov python3
11 | ```
12 |
13 | ## Setup
14 |
15 | ```bash
16 | # Clone the repository
17 | git clone
18 | cd stevensStringLib
19 |
20 | # Dependencies (Google Test & Benchmark) are automatically downloaded by CMake!
21 | # No submodule initialization needed - just build and run!
22 | ```
23 |
24 | ## Run Tests
25 |
26 | ```bash
27 | # Simple test run
28 | ./scripts/run_tests.sh
29 |
30 | # With coverage report
31 | ./scripts/run_tests.sh --coverage
32 |
33 | # View coverage
34 | xdg-open testing/build_test/coverage_report/index.html
35 | ```
36 |
37 | ## Run Benchmarks
38 |
39 | ```bash
40 | # Console output
41 | ./scripts/run_benchmarks.sh
42 |
43 | # JSON output for comparison
44 | ./scripts/run_benchmarks.sh --format json
45 |
46 | # All formats
47 | ./scripts/run_benchmarks.sh --format all
48 | ```
49 |
50 | ## Project Structure
51 |
52 | ```
53 | stevensStringLib/
54 | ├── stevensStringLib.h # Main library (single header)
55 | ├── testing/ # Test suite
56 | │ ├── unit/ # Modular test files
57 | │ ├── fixtures/ # Shared test data
58 | │ └── _deps/ # Google Test (auto-downloaded by CMake)
59 | ├── benchmarking/ # Benchmark suite
60 | │ ├── benchmarks/ # Modular benchmark files
61 | │ └── _deps/ # Google Benchmark (auto-downloaded)
62 | ├── scripts/ # Automation scripts
63 | │ ├── run_tests.sh # Test runner
64 | │ ├── run_benchmarks.sh # Benchmark runner
65 | │ └── compare_benchmarks.py # Comparison tool
66 | └── .github/workflows/ # CI/CD configuration
67 | ```
68 |
69 | ## Common Commands
70 |
71 | ### Testing
72 |
73 | ```bash
74 | # Run all tests
75 | ./scripts/run_tests.sh
76 |
77 | # Run with sanitizers (detect memory issues)
78 | ./scripts/run_tests.sh --sanitizers
79 |
80 | # Run specific test
81 | cd testing/build
82 | ./stevensStringLibTest --gtest_filter="Contains*"
83 |
84 | # List all tests
85 | ./stevensStringLibTest --gtest_list_tests
86 | ```
87 |
88 | ### Benchmarking
89 |
90 | ```bash
91 | # Basic benchmark
92 | ./scripts/run_benchmarks.sh
93 |
94 | # Save results for comparison
95 | ./scripts/run_benchmarks.sh --format json
96 | cp benchmarking/results/benchmark_*.json benchmarking/baseline.json
97 |
98 | # Compare after changes
99 | ./scripts/run_benchmarks.sh --format json
100 | ./scripts/compare_benchmarks.py \
101 | benchmarking/baseline.json \
102 | benchmarking/results/benchmark_*.json
103 | ```
104 |
105 | ### Development Workflow
106 |
107 | ```bash
108 | # 1. Make changes to stevensStringLib.h
109 |
110 | # 2. Run tests
111 | ./scripts/run_tests.sh --coverage
112 |
113 | # 3. Check coverage (aim for 80%+)
114 | xdg-open testing/build_test/coverage_report/index.html
115 |
116 | # 4. Run benchmarks
117 | ./scripts/run_benchmarks.sh --format json
118 |
119 | # 5. Compare performance
120 | ./scripts/compare_benchmarks.py baseline.json current.json
121 |
122 | # 6. Commit if all pass
123 | git add .
124 | git commit -m "Your changes"
125 | git push
126 | ```
127 |
128 | ## Test Organization
129 |
130 | Tests are organized by function category:
131 |
132 | - `string_validation_test.cpp` - isInteger, isFloat, isNumber
133 | - `string_manipulation_test.cpp` - separate, join, trim, reverse
134 | - `string_searching_test.cpp` - contains, find, startsWith
135 | - `string_conversion_test.cpp` - format, replace, mapify
136 | - `property_based_test.cpp` - Randomized property tests
137 |
138 | ## Benchmark Organization
139 |
140 | Benchmarks compare against baselines:
141 |
142 | - `benchmark_separate.cpp` - Baseline vs library, scaling, worst-case
143 | - `benchmark_join.cpp` - Performance comparisons, roundtrip tests
144 | - `benchmark_validation.cpp` - Type checking performance
145 |
146 | ## CI/CD
147 |
148 | GitHub Actions automatically runs:
149 | - ✅ Tests on GCC and Clang
150 | - ✅ Coverage analysis
151 | - ✅ Sanitizer checks
152 | - ✅ Performance benchmarks
153 | - ✅ Documentation build
154 |
155 | View results: GitHub → Actions tab
156 |
157 | ## Troubleshooting
158 |
159 | ### "googletest not found"
160 | This should not happen as CMake automatically downloads dependencies.
161 | If you see this error:
162 | ```bash
163 | # Clean and rebuild
164 | cd testing
165 | rm -rf build _deps
166 | cmake -S . -B build
167 | cmake --build build
168 | ```
169 |
170 | ### "lcov not found"
171 | ```bash
172 | sudo apt-get install lcov
173 | ```
174 |
175 | ### High benchmark variance
176 | ```bash
177 | # Use performance mode
178 | ./scripts/run_benchmarks.sh --performance --repetitions 10
179 | ```
180 |
181 | ### Test build fails
182 | ```bash
183 | # Clean rebuild
184 | cd testing
185 | rm -rf build
186 | ./scripts/run_tests.sh --clean
187 | ```
188 |
189 | ## More Information
190 |
191 | - **Full testing guide:** See `TESTING.md`
192 | - **Implementation details:** See `IMPLEMENTATION_SUMMARY.md`
193 | - **Library documentation:** See `README.md`
194 |
195 | ## Quick Reference
196 |
197 | | Task | Command |
198 | |------|---------|
199 | | Run tests | `./scripts/run_tests.sh` |
200 | | Run with coverage | `./scripts/run_tests.sh --coverage` |
201 | | Run with sanitizers | `./scripts/run_tests.sh --sanitizers` |
202 | | Run benchmarks | `./scripts/run_benchmarks.sh` |
203 | | Compare benchmarks | `./scripts/compare_benchmarks.py old.json new.json` |
204 | | Clean build | `./scripts/run_tests.sh --clean` |
205 | | View coverage | `xdg-open testing/build_test/coverage_report/index.html` |
206 |
207 | ## Support
208 |
209 | - 📖 Read `TESTING.md` for detailed documentation
210 | - 🐛 Open GitHub issue for bugs
211 | - 💡 Check CI logs for build errors
212 | - 📧 Contact: See repository
213 |
214 | ---
215 |
216 | **Now you're ready to develop with confidence!** 🎉
217 |
--------------------------------------------------------------------------------
/html/menu.js:
--------------------------------------------------------------------------------
1 | /*
2 | @licstart The following is the entire license notice for the JavaScript code in this file.
3 |
4 | The MIT License (MIT)
5 |
6 | Copyright (C) 1997-2020 by Dimitri van Heesch
7 |
8 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software
9 | and associated documentation files (the "Software"), to deal in the Software without restriction,
10 | including without limitation the rights to use, copy, modify, merge, publish, distribute,
11 | sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
12 | furnished to do so, subject to the following conditions:
13 |
14 | The above copyright notice and this permission notice shall be included in all copies or
15 | substantial portions of the Software.
16 |
17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
18 | BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
20 | DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 |
23 | @licend The above is the entire license notice for the JavaScript code in this file
24 | */
25 | function initMenu(relPath,searchEnabled,serverSide,searchPage,search) {
26 | function makeTree(data,relPath) {
27 | var result='';
28 | if ('children' in data) {
29 | result+='';
30 | for (var i in data.children) {
31 | var url;
32 | var link;
33 | link = data.children[i].url;
34 | if (link.substring(0,1)=='^') {
35 | url = link.substring(1);
36 | } else {
37 | url = relPath+link;
38 | }
39 | result+=''+
40 | data.children[i].text+' '+
41 | makeTree(data.children[i],relPath)+' ';
42 | }
43 | result+=' ';
44 | }
45 | return result;
46 | }
47 | var searchBoxHtml;
48 | if (searchEnabled) {
49 | if (serverSide) {
50 | searchBoxHtml=''+
51 | '
'+
52 | ''+
58 | '
'+
59 | '
'+
60 | '
';
61 | } else {
62 | searchBoxHtml=''+
63 | '
'+
64 | ' '+
66 | ' '+
70 | ' '+
71 | '
'+
73 | ' '+
75 | ''+
76 | '
';
77 | }
78 | }
79 |
80 | $('#main-nav').before(' '+
81 | ''+
82 | ' '+
83 | 'Toggle main menu visibility '+
84 | ' '+
85 | '
');
86 | $('#main-nav').append(makeTree(menudata,relPath));
87 | $('#main-nav').children(':first').addClass('sm sm-dox').attr('id','main-menu');
88 | if (searchBoxHtml) {
89 | $('#main-menu').append(' ');
90 | }
91 | var $mainMenuState = $('#main-menu-state');
92 | var prevWidth = 0;
93 | if ($mainMenuState.length) {
94 | function initResizableIfExists() {
95 | if (typeof initResizable==='function') initResizable();
96 | }
97 | // animate mobile menu
98 | $mainMenuState.change(function(e) {
99 | var $menu = $('#main-menu');
100 | var options = { duration: 250, step: initResizableIfExists };
101 | if (this.checked) {
102 | options['complete'] = function() { $menu.css('display', 'block') };
103 | $menu.hide().slideDown(options);
104 | } else {
105 | options['complete'] = function() { $menu.css('display', 'none') };
106 | $menu.show().slideUp(options);
107 | }
108 | });
109 | // set default menu visibility
110 | function resetState() {
111 | var $menu = $('#main-menu');
112 | var $mainMenuState = $('#main-menu-state');
113 | var newWidth = $(window).outerWidth();
114 | if (newWidth!=prevWidth) {
115 | if ($(window).outerWidth()<768) {
116 | $mainMenuState.prop('checked',false); $menu.hide();
117 | $('#searchBoxPos1').html(searchBoxHtml);
118 | $('#searchBoxPos2').hide();
119 | } else {
120 | $menu.show();
121 | $('#searchBoxPos1').empty();
122 | $('#searchBoxPos2').html(searchBoxHtml);
123 | $('#searchBoxPos2').show();
124 | }
125 | if (typeof searchBox!=='undefined') {
126 | searchBox.CloseResultsWindow();
127 | }
128 | prevWidth = newWidth;
129 | }
130 | }
131 | $(window).ready(function() { resetState(); initResizableIfExists(); });
132 | $(window).resize(resetState);
133 | }
134 | $('#main-menu').smartmenus();
135 | }
136 | /* @license-end */
137 |
--------------------------------------------------------------------------------
/docs/html/menu.js:
--------------------------------------------------------------------------------
1 | /*
2 | @licstart The following is the entire license notice for the JavaScript code in this file.
3 |
4 | The MIT License (MIT)
5 |
6 | Copyright (C) 1997-2020 by Dimitri van Heesch
7 |
8 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software
9 | and associated documentation files (the "Software"), to deal in the Software without restriction,
10 | including without limitation the rights to use, copy, modify, merge, publish, distribute,
11 | sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
12 | furnished to do so, subject to the following conditions:
13 |
14 | The above copyright notice and this permission notice shall be included in all copies or
15 | substantial portions of the Software.
16 |
17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
18 | BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
20 | DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 |
23 | @licend The above is the entire license notice for the JavaScript code in this file
24 | */
25 | function initMenu(relPath,searchEnabled,serverSide,searchPage,search) {
26 | function makeTree(data,relPath) {
27 | var result='';
28 | if ('children' in data) {
29 | result+='';
30 | for (var i in data.children) {
31 | var url;
32 | var link;
33 | link = data.children[i].url;
34 | if (link.substring(0,1)=='^') {
35 | url = link.substring(1);
36 | } else {
37 | url = relPath+link;
38 | }
39 | result+=''+
40 | data.children[i].text+' '+
41 | makeTree(data.children[i],relPath)+' ';
42 | }
43 | result+=' ';
44 | }
45 | return result;
46 | }
47 | var searchBoxHtml;
48 | if (searchEnabled) {
49 | if (serverSide) {
50 | searchBoxHtml=''+
51 | '
'+
52 | ''+
58 | '
'+
59 | '
'+
60 | '
';
61 | } else {
62 | searchBoxHtml=''+
63 | '
'+
64 | ' '+
66 | ' '+
70 | ' '+
71 | '
'+
73 | ' '+
75 | ''+
76 | '
';
77 | }
78 | }
79 |
80 | $('#main-nav').before(' '+
81 | ''+
82 | ' '+
83 | 'Toggle main menu visibility '+
84 | ' '+
85 | '
');
86 | $('#main-nav').append(makeTree(menudata,relPath));
87 | $('#main-nav').children(':first').addClass('sm sm-dox').attr('id','main-menu');
88 | if (searchBoxHtml) {
89 | $('#main-menu').append(' ');
90 | }
91 | var $mainMenuState = $('#main-menu-state');
92 | var prevWidth = 0;
93 | if ($mainMenuState.length) {
94 | function initResizableIfExists() {
95 | if (typeof initResizable==='function') initResizable();
96 | }
97 | // animate mobile menu
98 | $mainMenuState.change(function(e) {
99 | var $menu = $('#main-menu');
100 | var options = { duration: 250, step: initResizableIfExists };
101 | if (this.checked) {
102 | options['complete'] = function() { $menu.css('display', 'block') };
103 | $menu.hide().slideDown(options);
104 | } else {
105 | options['complete'] = function() { $menu.css('display', 'none') };
106 | $menu.show().slideUp(options);
107 | }
108 | });
109 | // set default menu visibility
110 | function resetState() {
111 | var $menu = $('#main-menu');
112 | var $mainMenuState = $('#main-menu-state');
113 | var newWidth = $(window).outerWidth();
114 | if (newWidth!=prevWidth) {
115 | if ($(window).outerWidth()<768) {
116 | $mainMenuState.prop('checked',false); $menu.hide();
117 | $('#searchBoxPos1').html(searchBoxHtml);
118 | $('#searchBoxPos2').hide();
119 | } else {
120 | $menu.show();
121 | $('#searchBoxPos1').empty();
122 | $('#searchBoxPos2').html(searchBoxHtml);
123 | $('#searchBoxPos2').show();
124 | }
125 | if (typeof searchBox!=='undefined') {
126 | searchBox.CloseResultsWindow();
127 | }
128 | prevWidth = newWidth;
129 | }
130 | }
131 | $(window).ready(function() { resetState(); initResizableIfExists(); });
132 | $(window).resize(resetState);
133 | }
134 | $('#main-menu').smartmenus();
135 | }
136 | /* @license-end */
137 |
--------------------------------------------------------------------------------
/html/search/search.css:
--------------------------------------------------------------------------------
1 | /*---------------- Search Box positioning */
2 |
3 | #main-menu > li:last-child {
4 | /* This object is the parent of the search bar */
5 | display: flex;
6 | justify-content: center;
7 | align-items: center;
8 | height: 36px;
9 | margin-right: 1em;
10 | }
11 |
12 | /*---------------- Search box styling */
13 |
14 | .SRPage * {
15 | font-weight: normal;
16 | line-height: normal;
17 | }
18 |
19 | dark-mode-toggle {
20 | margin-left: 5px;
21 | display: flex;
22 | float: right;
23 | }
24 |
25 | #MSearchBox {
26 | display: inline-block;
27 | white-space : nowrap;
28 | background: var(--search-background-color);
29 | border-radius: 0.65em;
30 | box-shadow: var(--search-box-shadow);
31 | z-index: 102;
32 | }
33 |
34 | #MSearchBox .left {
35 | display: inline-block;
36 | vertical-align: middle;
37 | height: 1.4em;
38 | }
39 |
40 | #MSearchSelect {
41 | display: inline-block;
42 | vertical-align: middle;
43 | width: 20px;
44 | height: 19px;
45 | background-image: var(--search-magnification-select-image);
46 | margin: 0 0 0 0.3em;
47 | padding: 0;
48 | }
49 |
50 | #MSearchSelectExt {
51 | display: inline-block;
52 | vertical-align: middle;
53 | width: 10px;
54 | height: 19px;
55 | background-image: var(--search-magnification-image);
56 | margin: 0 0 0 0.5em;
57 | padding: 0;
58 | }
59 |
60 |
61 | #MSearchField {
62 | display: inline-block;
63 | vertical-align: middle;
64 | width: 7.5em;
65 | height: 19px;
66 | margin: 0 0.15em;
67 | padding: 0;
68 | line-height: 1em;
69 | border:none;
70 | color: var(--search-foreground-color);
71 | outline: none;
72 | font-family: var(--font-family-search);
73 | -webkit-border-radius: 0px;
74 | border-radius: 0px;
75 | background: none;
76 | }
77 |
78 | @media(hover: none) {
79 | /* to avoid zooming on iOS */
80 | #MSearchField {
81 | font-size: 16px;
82 | }
83 | }
84 |
85 | #MSearchBox .right {
86 | display: inline-block;
87 | vertical-align: middle;
88 | width: 1.4em;
89 | height: 1.4em;
90 | }
91 |
92 | #MSearchClose {
93 | display: none;
94 | font-size: inherit;
95 | background : none;
96 | border: none;
97 | margin: 0;
98 | padding: 0;
99 | outline: none;
100 |
101 | }
102 |
103 | #MSearchCloseImg {
104 | padding: 0.3em;
105 | margin: 0;
106 | }
107 |
108 | .MSearchBoxActive #MSearchField {
109 | color: var(--search-active-color);
110 | }
111 |
112 |
113 |
114 | /*---------------- Search filter selection */
115 |
116 | #MSearchSelectWindow {
117 | display: none;
118 | position: absolute;
119 | left: 0; top: 0;
120 | border: 1px solid var(--search-filter-border-color);
121 | background-color: var(--search-filter-background-color);
122 | z-index: 10001;
123 | padding-top: 4px;
124 | padding-bottom: 4px;
125 | -moz-border-radius: 4px;
126 | -webkit-border-top-left-radius: 4px;
127 | -webkit-border-top-right-radius: 4px;
128 | -webkit-border-bottom-left-radius: 4px;
129 | -webkit-border-bottom-right-radius: 4px;
130 | -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
131 | }
132 |
133 | .SelectItem {
134 | font: 8pt var(--font-family-search);
135 | padding-left: 2px;
136 | padding-right: 12px;
137 | border: 0px;
138 | }
139 |
140 | span.SelectionMark {
141 | margin-right: 4px;
142 | font-family: var(--font-family-monospace);
143 | outline-style: none;
144 | text-decoration: none;
145 | }
146 |
147 | a.SelectItem {
148 | display: block;
149 | outline-style: none;
150 | color: var(--search-filter-foreground-color);
151 | text-decoration: none;
152 | padding-left: 6px;
153 | padding-right: 12px;
154 | }
155 |
156 | a.SelectItem:focus,
157 | a.SelectItem:active {
158 | color: var(--search-filter-foreground-color);
159 | outline-style: none;
160 | text-decoration: none;
161 | }
162 |
163 | a.SelectItem:hover {
164 | color: var(--search-filter-highlight-text-color);
165 | background-color: var(--search-filter-highlight-bg-color);
166 | outline-style: none;
167 | text-decoration: none;
168 | cursor: pointer;
169 | display: block;
170 | }
171 |
172 | /*---------------- Search results window */
173 |
174 | iframe#MSearchResults {
175 | /*width: 60ex;*/
176 | height: 15em;
177 | }
178 |
179 | #MSearchResultsWindow {
180 | display: none;
181 | position: absolute;
182 | left: 0; top: 0;
183 | border: 1px solid var(--search-results-border-color);
184 | background-color: var(--search-results-background-color);
185 | z-index:10000;
186 | width: 300px;
187 | height: 400px;
188 | overflow: auto;
189 | }
190 |
191 | /* ----------------------------------- */
192 |
193 |
194 | #SRIndex {
195 | clear:both;
196 | }
197 |
198 | .SREntry {
199 | font-size: 10pt;
200 | padding-left: 1ex;
201 | }
202 |
203 | .SRPage .SREntry {
204 | font-size: 8pt;
205 | padding: 1px 5px;
206 | }
207 |
208 | div.SRPage {
209 | margin: 5px 2px;
210 | background-color: var(--search-results-background-color);
211 | }
212 |
213 | .SRChildren {
214 | padding-left: 3ex; padding-bottom: .5em
215 | }
216 |
217 | .SRPage .SRChildren {
218 | display: none;
219 | }
220 |
221 | .SRSymbol {
222 | font-weight: bold;
223 | color: var(--search-results-foreground-color);
224 | font-family: var(--font-family-search);
225 | text-decoration: none;
226 | outline: none;
227 | }
228 |
229 | a.SRScope {
230 | display: block;
231 | color: var(--search-results-foreground-color);
232 | font-family: var(--font-family-search);
233 | font-size: 8pt;
234 | text-decoration: none;
235 | outline: none;
236 | }
237 |
238 | a.SRSymbol:focus, a.SRSymbol:active,
239 | a.SRScope:focus, a.SRScope:active {
240 | text-decoration: underline;
241 | }
242 |
243 | span.SRScope {
244 | padding-left: 4px;
245 | font-family: var(--font-family-search);
246 | }
247 |
248 | .SRPage .SRStatus {
249 | padding: 2px 5px;
250 | font-size: 8pt;
251 | font-style: italic;
252 | font-family: var(--font-family-search);
253 | }
254 |
255 | .SRResult {
256 | display: none;
257 | }
258 |
259 | div.searchresults {
260 | margin-left: 10px;
261 | margin-right: 10px;
262 | }
263 |
264 | /*---------------- External search page results */
265 |
266 | .pages b {
267 | color: white;
268 | padding: 5px 5px 3px 5px;
269 | background-image: var(--nav-gradient-active-image-parent);
270 | background-repeat: repeat-x;
271 | text-shadow: 0 1px 1px #000000;
272 | }
273 |
274 | .pages {
275 | line-height: 17px;
276 | margin-left: 4px;
277 | text-decoration: none;
278 | }
279 |
280 | .hl {
281 | font-weight: bold;
282 | }
283 |
284 | #searchresults {
285 | margin-bottom: 20px;
286 | }
287 |
288 | .searchpages {
289 | margin-top: 10px;
290 | }
291 |
292 |
--------------------------------------------------------------------------------
/docs/html/search/search.css:
--------------------------------------------------------------------------------
1 | /*---------------- Search Box positioning */
2 |
3 | #main-menu > li:last-child {
4 | /* This object is the parent of the search bar */
5 | display: flex;
6 | justify-content: center;
7 | align-items: center;
8 | height: 36px;
9 | margin-right: 1em;
10 | }
11 |
12 | /*---------------- Search box styling */
13 |
14 | .SRPage * {
15 | font-weight: normal;
16 | line-height: normal;
17 | }
18 |
19 | dark-mode-toggle {
20 | margin-left: 5px;
21 | display: flex;
22 | float: right;
23 | }
24 |
25 | #MSearchBox {
26 | display: inline-block;
27 | white-space : nowrap;
28 | background: var(--search-background-color);
29 | border-radius: 0.65em;
30 | box-shadow: var(--search-box-shadow);
31 | z-index: 102;
32 | }
33 |
34 | #MSearchBox .left {
35 | display: inline-block;
36 | vertical-align: middle;
37 | height: 1.4em;
38 | }
39 |
40 | #MSearchSelect {
41 | display: inline-block;
42 | vertical-align: middle;
43 | width: 20px;
44 | height: 19px;
45 | background-image: var(--search-magnification-select-image);
46 | margin: 0 0 0 0.3em;
47 | padding: 0;
48 | }
49 |
50 | #MSearchSelectExt {
51 | display: inline-block;
52 | vertical-align: middle;
53 | width: 10px;
54 | height: 19px;
55 | background-image: var(--search-magnification-image);
56 | margin: 0 0 0 0.5em;
57 | padding: 0;
58 | }
59 |
60 |
61 | #MSearchField {
62 | display: inline-block;
63 | vertical-align: middle;
64 | width: 7.5em;
65 | height: 19px;
66 | margin: 0 0.15em;
67 | padding: 0;
68 | line-height: 1em;
69 | border:none;
70 | color: var(--search-foreground-color);
71 | outline: none;
72 | font-family: var(--font-family-search);
73 | -webkit-border-radius: 0px;
74 | border-radius: 0px;
75 | background: none;
76 | }
77 |
78 | @media(hover: none) {
79 | /* to avoid zooming on iOS */
80 | #MSearchField {
81 | font-size: 16px;
82 | }
83 | }
84 |
85 | #MSearchBox .right {
86 | display: inline-block;
87 | vertical-align: middle;
88 | width: 1.4em;
89 | height: 1.4em;
90 | }
91 |
92 | #MSearchClose {
93 | display: none;
94 | font-size: inherit;
95 | background : none;
96 | border: none;
97 | margin: 0;
98 | padding: 0;
99 | outline: none;
100 |
101 | }
102 |
103 | #MSearchCloseImg {
104 | padding: 0.3em;
105 | margin: 0;
106 | }
107 |
108 | .MSearchBoxActive #MSearchField {
109 | color: var(--search-active-color);
110 | }
111 |
112 |
113 |
114 | /*---------------- Search filter selection */
115 |
116 | #MSearchSelectWindow {
117 | display: none;
118 | position: absolute;
119 | left: 0; top: 0;
120 | border: 1px solid var(--search-filter-border-color);
121 | background-color: var(--search-filter-background-color);
122 | z-index: 10001;
123 | padding-top: 4px;
124 | padding-bottom: 4px;
125 | -moz-border-radius: 4px;
126 | -webkit-border-top-left-radius: 4px;
127 | -webkit-border-top-right-radius: 4px;
128 | -webkit-border-bottom-left-radius: 4px;
129 | -webkit-border-bottom-right-radius: 4px;
130 | -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
131 | }
132 |
133 | .SelectItem {
134 | font: 8pt var(--font-family-search);
135 | padding-left: 2px;
136 | padding-right: 12px;
137 | border: 0px;
138 | }
139 |
140 | span.SelectionMark {
141 | margin-right: 4px;
142 | font-family: var(--font-family-monospace);
143 | outline-style: none;
144 | text-decoration: none;
145 | }
146 |
147 | a.SelectItem {
148 | display: block;
149 | outline-style: none;
150 | color: var(--search-filter-foreground-color);
151 | text-decoration: none;
152 | padding-left: 6px;
153 | padding-right: 12px;
154 | }
155 |
156 | a.SelectItem:focus,
157 | a.SelectItem:active {
158 | color: var(--search-filter-foreground-color);
159 | outline-style: none;
160 | text-decoration: none;
161 | }
162 |
163 | a.SelectItem:hover {
164 | color: var(--search-filter-highlight-text-color);
165 | background-color: var(--search-filter-highlight-bg-color);
166 | outline-style: none;
167 | text-decoration: none;
168 | cursor: pointer;
169 | display: block;
170 | }
171 |
172 | /*---------------- Search results window */
173 |
174 | iframe#MSearchResults {
175 | /*width: 60ex;*/
176 | height: 15em;
177 | }
178 |
179 | #MSearchResultsWindow {
180 | display: none;
181 | position: absolute;
182 | left: 0; top: 0;
183 | border: 1px solid var(--search-results-border-color);
184 | background-color: var(--search-results-background-color);
185 | z-index:10000;
186 | width: 300px;
187 | height: 400px;
188 | overflow: auto;
189 | }
190 |
191 | /* ----------------------------------- */
192 |
193 |
194 | #SRIndex {
195 | clear:both;
196 | }
197 |
198 | .SREntry {
199 | font-size: 10pt;
200 | padding-left: 1ex;
201 | }
202 |
203 | .SRPage .SREntry {
204 | font-size: 8pt;
205 | padding: 1px 5px;
206 | }
207 |
208 | div.SRPage {
209 | margin: 5px 2px;
210 | background-color: var(--search-results-background-color);
211 | }
212 |
213 | .SRChildren {
214 | padding-left: 3ex; padding-bottom: .5em
215 | }
216 |
217 | .SRPage .SRChildren {
218 | display: none;
219 | }
220 |
221 | .SRSymbol {
222 | font-weight: bold;
223 | color: var(--search-results-foreground-color);
224 | font-family: var(--font-family-search);
225 | text-decoration: none;
226 | outline: none;
227 | }
228 |
229 | a.SRScope {
230 | display: block;
231 | color: var(--search-results-foreground-color);
232 | font-family: var(--font-family-search);
233 | font-size: 8pt;
234 | text-decoration: none;
235 | outline: none;
236 | }
237 |
238 | a.SRSymbol:focus, a.SRSymbol:active,
239 | a.SRScope:focus, a.SRScope:active {
240 | text-decoration: underline;
241 | }
242 |
243 | span.SRScope {
244 | padding-left: 4px;
245 | font-family: var(--font-family-search);
246 | }
247 |
248 | .SRPage .SRStatus {
249 | padding: 2px 5px;
250 | font-size: 8pt;
251 | font-style: italic;
252 | font-family: var(--font-family-search);
253 | }
254 |
255 | .SRResult {
256 | display: none;
257 | }
258 |
259 | div.searchresults {
260 | margin-left: 10px;
261 | margin-right: 10px;
262 | }
263 |
264 | /*---------------- External search page results */
265 |
266 | .pages b {
267 | color: white;
268 | padding: 5px 5px 3px 5px;
269 | background-image: var(--nav-gradient-active-image-parent);
270 | background-repeat: repeat-x;
271 | text-shadow: 0 1px 1px #000000;
272 | }
273 |
274 | .pages {
275 | line-height: 17px;
276 | margin-left: 4px;
277 | text-decoration: none;
278 | }
279 |
280 | .hl {
281 | font-weight: bold;
282 | }
283 |
284 | #searchresults {
285 | margin-bottom: 20px;
286 | }
287 |
288 | .searchpages {
289 | margin-top: 10px;
290 | }
291 |
292 |
--------------------------------------------------------------------------------
/benchmarking/benchmarks/benchmark_separate.cpp:
--------------------------------------------------------------------------------
1 | /**
2 | * @file benchmark_separate.cpp
3 | * @brief Comprehensive benchmarks for separate() function
4 | *
5 | * Includes baseline comparisons, scaling tests, and worst-case scenarios
6 | */
7 |
8 | #include
9 | #include
10 | #include
11 | #include "../../stevensStringLib.h"
12 |
13 | // ============================================================================
14 | // BASELINE BENCHMARKS - Compare against standard library
15 | // ============================================================================
16 |
17 | static void Separate_Baseline_IStringStream(benchmark::State& state) {
18 | std::string input = "apple,banana,cherry,date,elderberry,fig,grape,honeydew";
19 |
20 | for (auto _ : state) {
21 | std::vector result;
22 | std::istringstream ss(input);
23 | std::string token;
24 | while(std::getline(ss, token, ',')) {
25 | result.push_back(token);
26 | }
27 | benchmark::DoNotOptimize(result);
28 | }
29 | }
30 | BENCHMARK(Separate_Baseline_IStringStream);
31 |
32 | static void Separate_Baseline_ManualFind(benchmark::State& state) {
33 | std::string input = "apple,banana,cherry,date,elderberry,fig,grape,honeydew";
34 | const char sep = ',';
35 |
36 | for (auto _ : state) {
37 | std::vector result;
38 | size_t start = 0;
39 | size_t end = input.find(sep);
40 |
41 | while (end != std::string::npos) {
42 | result.push_back(input.substr(start, end - start));
43 | start = end + 1;
44 | end = input.find(sep, start);
45 | }
46 | result.push_back(input.substr(start));
47 |
48 | benchmark::DoNotOptimize(result);
49 | }
50 | }
51 | BENCHMARK(Separate_Baseline_ManualFind);
52 |
53 | // ============================================================================
54 | // LIBRARY BENCHMARKS - Char separator
55 | // ============================================================================
56 |
57 | static void Separate_Library_Char(benchmark::State& state) {
58 | std::string input = "apple,banana,cherry,date,elderberry,fig,grape,honeydew";
59 |
60 | for (auto _ : state) {
61 | auto result = stevensStringLib::separate(input, ',');
62 | benchmark::DoNotOptimize(result);
63 | }
64 | }
65 | BENCHMARK(Separate_Library_Char);
66 |
67 | // ============================================================================
68 | // LIBRARY BENCHMARKS - String separator
69 | // ============================================================================
70 |
71 | static void Separate_Library_String(benchmark::State& state) {
72 | std::string input = "apple and banana and cherry and date and elderberry";
73 |
74 | for (auto _ : state) {
75 | auto result = stevensStringLib::separate(input, " and ");
76 | benchmark::DoNotOptimize(result);
77 | }
78 | }
79 | BENCHMARK(Separate_Library_String);
80 |
81 | // ============================================================================
82 | // SCALING TESTS - How performance changes with input size
83 | // ============================================================================
84 |
85 | static void Separate_Scaling(benchmark::State& state) {
86 | size_t num_elements = state.range(0);
87 |
88 | // Generate input with N elements
89 | std::string input;
90 | for(size_t i = 0; i < num_elements; ++i) {
91 | if(i > 0) input += ",";
92 | input += "element" + std::to_string(i);
93 | }
94 |
95 | for (auto _ : state) {
96 | auto result = stevensStringLib::separate(input, ',');
97 | benchmark::DoNotOptimize(result);
98 | }
99 |
100 | state.SetComplexityN(num_elements);
101 | state.SetItemsProcessed(state.iterations() * num_elements);
102 | state.SetBytesProcessed(state.iterations() * input.size());
103 | }
104 | BENCHMARK(Separate_Scaling)
105 | ->RangeMultiplier(2)
106 | ->Range(8, 8<<10)
107 | ->Complexity(benchmark::oN);
108 |
109 | // ============================================================================
110 | // WORST CASE - No separators found
111 | // ============================================================================
112 |
113 | static void Separate_WorstCase_NoSeparators(benchmark::State& state) {
114 | size_t str_len = state.range(0);
115 | std::string input(str_len, 'a'); // Long string with no commas
116 |
117 | for (auto _ : state) {
118 | auto result = stevensStringLib::separate(input, ',');
119 | benchmark::DoNotOptimize(result);
120 | }
121 |
122 | state.SetBytesProcessed(state.iterations() * input.size());
123 | }
124 | BENCHMARK(Separate_WorstCase_NoSeparators)
125 | ->Range(8, 8<<15);
126 |
127 | // ============================================================================
128 | // WORST CASE - Many empty elements
129 | // ============================================================================
130 |
131 | static void Separate_WorstCase_ManySeparators(benchmark::State& state) {
132 | size_t num_seps = state.range(0);
133 | std::string input(num_seps, ','); // Just separators: ",,,,,,"
134 |
135 | for (auto _ : state) {
136 | auto result = stevensStringLib::separate(input, ',', false); // Don't omit empty
137 | benchmark::DoNotOptimize(result);
138 | }
139 | }
140 | BENCHMARK(Separate_WorstCase_ManySeparators)
141 | ->Range(8, 8<<10);
142 |
143 | // ============================================================================
144 | // REAL WORLD - CSV parsing
145 | // ============================================================================
146 |
147 | static void Separate_CSV_RealWorld(benchmark::State& state) {
148 | const std::string csv_line =
149 | "John,Doe,john.doe@email.com,555-1234,123 Main St,New York,NY,10001";
150 |
151 | for (auto _ : state) {
152 | auto result = stevensStringLib::separate(csv_line, ',');
153 | benchmark::DoNotOptimize(result);
154 | }
155 | }
156 | BENCHMARK(Separate_CSV_RealWorld);
157 |
158 | // ============================================================================
159 | // REAL WORLD - Path parsing
160 | // ============================================================================
161 |
162 | static void Separate_Path_RealWorld(benchmark::State& state) {
163 | const std::string path = "/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin";
164 |
165 | for (auto _ : state) {
166 | auto result = stevensStringLib::separate(path, ':');
167 | benchmark::DoNotOptimize(result);
168 | }
169 | }
170 | BENCHMARK(Separate_Path_RealWorld);
171 |
172 | // ============================================================================
173 | // COMPARISON - Empty separator (split into chars)
174 | // ============================================================================
175 |
176 | static void Separate_EmptySeparator(benchmark::State& state) {
177 | const std::string input = "Hello, World!";
178 |
179 | for (auto _ : state) {
180 | auto result = stevensStringLib::separate(input, "");
181 | benchmark::DoNotOptimize(result);
182 | }
183 | }
184 | BENCHMARK(Separate_EmptySeparator);
185 |
--------------------------------------------------------------------------------
/scripts/run_tests.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | # ==============================================================================
3 | # run_tests.sh - Run stevensStringLib tests with various configurations
4 | # ==============================================================================
5 |
6 | set -e
7 |
8 | # Colors for output
9 | RED='\033[0;31m'
10 | GREEN='\033[0;32m'
11 | YELLOW='\033[1;33m'
12 | BLUE='\033[0;34m'
13 | NC='\033[0m' # No Color
14 |
15 | # Configuration
16 | BUILD_DIR="build_test"
17 | SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
18 | PROJECT_ROOT="$(dirname "$SCRIPT_DIR")"
19 | TEST_DIR="$PROJECT_ROOT/testing"
20 |
21 | # Default options
22 | ENABLE_COVERAGE=false
23 | ENABLE_SANITIZERS=false
24 | BUILD_TYPE="Release"
25 | RUN_TESTS=true
26 | CLEAN_BUILD=false
27 |
28 | # ==============================================================================
29 | # Functions
30 | # ==============================================================================
31 |
32 | print_header() {
33 | echo -e "${BLUE}============================================================${NC}"
34 | echo -e "${BLUE}$1${NC}"
35 | echo -e "${BLUE}============================================================${NC}"
36 | }
37 |
38 | print_success() {
39 | echo -e "${GREEN}✓ $1${NC}"
40 | }
41 |
42 | print_error() {
43 | echo -e "${RED}✗ $1${NC}"
44 | }
45 |
46 | print_info() {
47 | echo -e "${YELLOW}ℹ $1${NC}"
48 | }
49 |
50 | show_usage() {
51 | cat << EOF
52 | Usage: $0 [OPTIONS]
53 |
54 | Run stevensStringLib tests with various configurations.
55 |
56 | OPTIONS:
57 | -c, --coverage Enable code coverage reporting
58 | -s, --sanitizers Enable address and undefined behavior sanitizers
59 | -d, --debug Build in Debug mode (default: Release)
60 | -n, --no-run Build but don't run tests
61 | --clean Clean build directory before building
62 | -h, --help Show this help message
63 |
64 | EXAMPLES:
65 | $0 # Run tests in Release mode
66 | $0 -c # Run tests with coverage
67 | $0 -s # Run tests with sanitizers
68 | $0 -c --clean # Clean build with coverage
69 | $0 -d -s # Debug build with sanitizers
70 |
71 | EOF
72 | }
73 |
74 | # ==============================================================================
75 | # Parse command line arguments
76 | # ==============================================================================
77 |
78 | while [[ $# -gt 0 ]]; do
79 | case $1 in
80 | -c|--coverage)
81 | ENABLE_COVERAGE=true
82 | BUILD_TYPE="Debug" # Coverage requires Debug build
83 | shift
84 | ;;
85 | -s|--sanitizers)
86 | ENABLE_SANITIZERS=true
87 | BUILD_TYPE="Debug" # Sanitizers work best with Debug
88 | shift
89 | ;;
90 | -d|--debug)
91 | BUILD_TYPE="Debug"
92 | shift
93 | ;;
94 | -n|--no-run)
95 | RUN_TESTS=false
96 | shift
97 | ;;
98 | --clean)
99 | CLEAN_BUILD=true
100 | shift
101 | ;;
102 | -h|--help)
103 | show_usage
104 | exit 0
105 | ;;
106 | *)
107 | echo "Unknown option: $1"
108 | show_usage
109 | exit 1
110 | ;;
111 | esac
112 | done
113 |
114 | # ==============================================================================
115 | # Main script
116 | # ==============================================================================
117 |
118 | cd "$TEST_DIR"
119 |
120 | print_header "stevensStringLib Test Suite"
121 |
122 | echo "Configuration:"
123 | echo " Build Type: $BUILD_TYPE"
124 | echo " Coverage: $ENABLE_COVERAGE"
125 | echo " Sanitizers: $ENABLE_SANITIZERS"
126 | echo " Build Directory: $BUILD_DIR"
127 | echo ""
128 |
129 | # Clean if requested
130 | if [ "$CLEAN_BUILD" = true ]; then
131 | print_info "Cleaning build directory..."
132 | rm -rf "$BUILD_DIR"
133 | fi
134 |
135 | # Create build directory
136 | mkdir -p "$BUILD_DIR"
137 | cd "$BUILD_DIR"
138 |
139 | # ==============================================================================
140 | # Configure with CMake
141 | # ==============================================================================
142 |
143 | print_header "Configuring with CMake"
144 |
145 | CMAKE_FLAGS=(
146 | -DCMAKE_BUILD_TYPE="$BUILD_TYPE"
147 | )
148 |
149 | if [ "$ENABLE_COVERAGE" = true ]; then
150 | CMAKE_FLAGS+=(-DENABLE_COVERAGE=ON)
151 | fi
152 |
153 | if [ "$ENABLE_SANITIZERS" = true ]; then
154 | CMAKE_FLAGS+=(-DENABLE_SANITIZERS=ON)
155 | fi
156 |
157 | cmake "${CMAKE_FLAGS[@]}" ..
158 |
159 | if [ $? -ne 0 ]; then
160 | print_error "CMake configuration failed"
161 | exit 1
162 | fi
163 |
164 | print_success "CMake configuration successful"
165 |
166 | # ==============================================================================
167 | # Build
168 | # ==============================================================================
169 |
170 | print_header "Building tests"
171 |
172 | make -j$(nproc)
173 |
174 | if [ $? -ne 0 ]; then
175 | print_error "Build failed"
176 | exit 1
177 | fi
178 |
179 | print_success "Build successful"
180 |
181 | # ==============================================================================
182 | # Run tests
183 | # ==============================================================================
184 |
185 | if [ "$RUN_TESTS" = true ]; then
186 | print_header "Running tests"
187 |
188 | ./stevensStringLibTest --gtest_color=yes
189 |
190 | if [ $? -ne 0 ]; then
191 | print_error "Tests failed"
192 | exit 1
193 | fi
194 |
195 | print_success "All tests passed"
196 | fi
197 |
198 | # ==============================================================================
199 | # Generate coverage report
200 | # ==============================================================================
201 |
202 | if [ "$ENABLE_COVERAGE" = true ] && [ "$RUN_TESTS" = true ]; then
203 | print_header "Generating coverage report"
204 |
205 | # Check if lcov is installed
206 | if ! command -v lcov &> /dev/null; then
207 | print_error "lcov not found. Install with: sudo apt-get install lcov"
208 | exit 1
209 | fi
210 |
211 | # Capture coverage data
212 | lcov --capture --directory . --output-file coverage.info
213 |
214 | # Remove external libraries from coverage
215 | lcov --remove coverage.info '/usr/*' '*/googletest/*' --output-file coverage_filtered.info
216 |
217 | # Generate HTML report
218 | genhtml coverage_filtered.info --output-directory coverage_report
219 |
220 | # Print summary
221 | echo ""
222 | print_header "Coverage Summary"
223 | lcov --list coverage_filtered.info
224 |
225 | print_success "Coverage report generated: $TEST_DIR/$BUILD_DIR/coverage_report/index.html"
226 | fi
227 |
228 | # ==============================================================================
229 | # Summary
230 | # ==============================================================================
231 |
232 | echo ""
233 | print_header "Test Summary"
234 |
235 | if [ "$RUN_TESTS" = true ]; then
236 | print_success "All tests completed successfully"
237 | else
238 | print_info "Tests built but not executed (use without -n to run)"
239 | fi
240 |
241 | if [ "$ENABLE_COVERAGE" = true ] && [ "$RUN_TESTS" = true ]; then
242 | echo ""
243 | print_info "To view coverage report:"
244 | echo " xdg-open $TEST_DIR/$BUILD_DIR/coverage_report/index.html"
245 | echo " or"
246 | echo " firefox $TEST_DIR/$BUILD_DIR/coverage_report/index.html"
247 | fi
248 |
249 | echo ""
250 |
--------------------------------------------------------------------------------