147d36a578
Improve messages of conversion tests
2023-02-05 21:21:26 +01:00
31f369d051
Add signed versions of swapOrder()
functions
2023-02-05 21:20:53 +01:00
024865cc44
Fix building conversion tests with MSVC
2023-02-01 00:42:44 +01:00
f81607be82
Possibly avoid ambiguous function call in conversion tests
...
This might avoid
```
/Users/oldfaithful/Local/tageditor/cpp-utilities/tests/conversiontests.cpp:29:15: error: call to 'swapOrder' is ambiguous static_assert(swapOrder(0xABCDEF1234567890ul) == 0x9078563412EFCDABul, "swapOrder(uint64)");
```
reported by https://github.com/Martchus/cpp-utilities/issues/22
2021-12-12 22:58:01 +01:00
b16fff4b0a
Test splitString*() with an empty input
2021-07-24 23:38:44 +02:00
2e93882882
Reduce redundant code in stringconversion.h
2021-05-24 19:51:49 +02:00
3afed30760
Detect overflow in functions to convert strings to numbers
...
Otherwise these functions can strictly run into undefined behavior which
should be prevented.
2021-05-24 19:51:49 +02:00
f549285fde
Fix splitString()/splitStringSimple() for case of empty trailing part
2021-05-11 16:42:28 +02:00
8c033ca243
Fix warnings
2021-03-20 21:56:45 +01:00
26b0d2d97c
Avoid some test classes to show up in the documentation
2020-05-01 13:47:06 +02:00
8744cf95ef
Ensure no copy is made when using argsToString()
...
It seems that std::make_tuple() is using __decay_and_strip so
the arguments get copied. Using the std::tuple c'tor directly
instead.
When using the %-operator it is already taken care that strings
are stored as pointers and not by value.
2020-02-18 19:29:23 +01:00
561f298567
Fix string builder tests for Windows
2020-02-14 17:14:06 +01:00
7204bc6f06
Support using string builder with types convertible to target string type
...
So e.g. std::filesystem::path can be used to build an std::string.
2020-02-13 17:05:46 +01:00
a5283535cc
Support nested tuples in string builder
...
This is useful to concatenate previously constructed sub
strings passed around as tuples.
2020-01-26 19:02:22 +01:00
b8a60a0cd4
Support string builder operator '%' for std::string_view
2019-11-28 23:05:55 +01:00
8e3aa84780
Support std::string_view in stringbuilder.h
2019-11-28 22:34:10 +01:00
1177381521
Add CppUtilities::endsWith()
2019-10-30 20:34:16 +01:00
2cdde81077
Fix startsWith() if strings are equal
2019-10-27 17:59:26 +01:00
b693c72eb1
Fix old namespaces being mentioned in the documentation
2019-09-04 18:45:28 +02:00
b48b2f5c06
Have everything in one top-level namespace
2019-06-10 21:56:46 +02:00
9a50d2b8df
Remove types
2019-04-13 20:33:39 +02:00
199a4f9454
Make conversion tests pass under Windows
2018-09-30 14:44:39 +02:00
da5a027ea3
Add simplified, string_view-compatible version of splitString()
2018-02-28 18:03:07 +01:00
bc61461b7a
Improve tests of conversion utilities
2018-01-29 16:25:31 +01:00
8b0661713b
Improve conversion tests
2017-06-25 16:03:46 +02:00
28f37bbbcd
string to int: Allow specifying string size
2017-06-08 00:41:29 +02:00
045c713cf5
string to int: Ignore whitespaces at beginning
2017-06-08 00:39:54 +02:00
db46948f2f
Apply clang-format
2017-05-04 22:44:15 +02:00
787d541974
Fix conversion of 0 to string
...
Return "0" instead of an empty string
2017-03-07 00:28:46 +01:00
c4d73b0d7d
Use C++14 string literal
2017-02-06 18:32:27 +01:00
17fe42e0ad
string builder: Support integral types directly
...
Not only convenient but also performance improvement
2017-01-30 00:11:33 +01:00
5c004015ce
string builder: Fix ambiguity issues
2017-01-27 18:50:51 +01:00
a772cdf30b
Add conveniently usable string builder
...
which allows fast string building without multiple heap allocations
2017-01-26 22:16:18 +01:00
2be349856f
Make numberToString/stringToNumber work with u16string
...
Don't rely on std::basic_stringstream at least for
integral types.
2016-11-13 23:06:03 +01:00
994181cbf9
Improve utilities for testing tageditor CLI
2016-08-03 17:31:28 +02:00
0c40a510e5
Add functions for character set conversions
2016-07-27 18:24:37 +02:00
d28d477ffe
Complete generation of API doc
...
- Use README.md for main page
- Add install target for API doc
- Improve some doc comments
2016-06-10 22:59:22 +02:00
78c096e20a
added functions to swap the byte order
2016-02-23 19:27:46 +01:00
80a4ce1790
added more test cases
2016-01-27 01:01:43 +01:00
e4910171e8
added check target and first tests
2016-01-26 18:52:41 +01:00