43 Commits

Author SHA1 Message Date
John Wellbelove
d884719098 Fixed all 'extra semicolon' warnings 2025-12-16 09:15:26 +00:00
mike919192
a6f4c0b4d1
Basic string checks (#1222)
* Add checks for index, front, back, and insert

* Add erase checks

* Add tests to string_char

* Add u16 tests

* Add tests to string u32

* Add u8 tests

* Add wchar tests

* Use size() for back functions.  Fix some uses of buffer2

* Add assert for swapped insert iterators.  Add tests
2025-11-27 08:52:37 +00:00
John Wellbelove
3837e36d71 Fixes to GCC -O2 errors 2025-09-02 13:51:45 +01:00
John Wellbelove
0428118553 Optimisation of strings 2025-05-31 21:47:25 +01:00
John Wellbelove
73308ede00 Made is_truncated available for all configurations 2025-04-12 15:04:21 +01:00
mike919192
ecf5d9bca3 Implement << operator for std basic_ostream and etl string_view (#1040)
* Implement << operator for std basic_ostream and etl string_view

* Implement << operator for std basic_ostream and etl ibasic_string.  Still working through tests

* Should be all tests

* Fix comment
2025-03-17 08:54:28 +00:00
John Wellbelove
109d45c646 Added additional checks for self assignment 2025-02-22 13:59:48 +00:00
John Wellbelove
f566076f42 Added member function resize_and_overwrite 2024-11-24 09:03:48 +00:00
John Wellbelove
d5cd9567cd Added starts_with and ends_with to basic_string 2024-11-23 12:33:36 +00:00
John Wellbelove
a3b40b667a Removed std::string_view interface
Added contains member functions
2024-11-23 10:47:41 +00:00
John Wellbelove
bc44bf7a46 Fixed C++ standard compatibility issues 2024-11-22 12:25:02 +00:00
John Wellbelove
61da85fa77 Removed float-equal warnings
Added functions is_nan, is_infinity, is_zero & is_exactly_equal
Fixed array-bounds warnings for GCC and -O2 optimisation
2023-11-21 15:13:24 +00:00
John Wellbelove
0f185c3fea Made unit test suite names unique 2023-08-10 12:08:42 +01:00
John Wellbelove
d1aaa77ade Resolve all C++ -O2 warnings
Resolve all C++ -O2 warnings

Resolve all C++ -O2 warnings
2023-08-10 12:08:18 +01:00
John Wellbelove
8b5ff06e44 Resolve all C++ -O2 warnings 2023-08-06 23:39:11 +01:00
John Wellbelove
b609548f38 Added ETL_OR_STD17 macro for the namespace for size() 2023-04-23 18:58:30 +01:00
John Wellbelove
8eabe5fb26 Fix test array sizes
C++14 compiler compatibility

Updated test run scripts

Changed some ETL_ASSERT macros to ETL_ASSERT_OR_RETURN

Changed unit test macros for C++20 compaibility

Updated test run scripts

Updated CMake files to allow C++ standard selection

Replaced ETL_ASSERT_AND_RETURN with ETL_ASSERT_OR_RETURN

Updated C++14 & C++20 unit test compatibility

Changed native char8_t check

Added optional optimisation argument to bash script
2023-03-25 12:16:59 +00:00
John Wellbelove
cd18cc6af0 Eradicated all GCC and clang warnings 2022-07-27 10:42:03 +01:00
John Wellbelove
baa47d1c33 Updated copyright notice 2022-06-10 21:45:37 +01:00
John Wellbelove
36d126c93e Squashed commit of the following:
commit c217b3ec12b26104e8f1027c1766cc9d49b93a29
Author: John Wellbelove <john.wellbelove@asterconsulting.co.uk>
Date:   Thu Apr 21 11:57:55 2022 +0200

    Added mutex traits

    Added transparent comparator test to multimap

commit b6487b869e5599ea067d45af1778d5c0f90c6a52
Author: John Wellbelove <john.wellbelove@asterconsulting.co.uk>
Date:   Thu Apr 21 10:42:06 2022 +0200

    Modified char8_t, char16_t and char32_t macros.

    Added conditional compilation on the presense of native char8_t, char16_t and char32_t types.

commit 2c2bd86ce3d5d5d698e922518421a93f70a9cc1e
Author: John Wellbelove <john.wellbelove@asterconsulting.co.uk>
Date:   Thu Apr 21 10:29:04 2022 +0200

    Modified char8_t, char16_t and char32_t macros.

    Added conditional compilation on the presense of native char8_t, char16_t and char32_t types.

commit d16242d20e9b6df6752a926d862d0016a452bada
Author: John Wellbelove <john.wellbelove@asterconsulting.co.uk>
Date:   Wed Apr 20 13:53:37 2022 +0200

    Expanded constexpr test

commit fad097e6656cd4639c2d81bc8cad2467cae4b4ce
Author: John Wellbelove <john.wellbelove@asterconsulting.co.uk>
Date:   Wed Apr 20 13:53:05 2022 +0200

    Added ETL_OVERRIDE to state chart process_event()

commit 25403c2225f3aff0b99105a54cfc44f1cf88d527
Author: John Wellbelove <john.wellbelove@asterconsulting.co.uk>
Date:   Wed Apr 20 13:41:00 2022 +0200

    Added test_etl_traits

commit e42c778cf645cb8fc06e5930336e7f1183004dfe
Author: John Wellbelove <john.wellbelove@asterconsulting.co.uk>
Date:   Wed Apr 20 13:38:22 2022 +0200

    Removed unused code.

commit 5a25c0c1973f7094ef3aa5b6f29529e96450451c
Author: John Wellbelove <john.wellbelove@asterconsulting.co.uk>
Date:   Sun Apr 17 13:17:29 2022 +0200

    Large and small character support macros

commit 6a463fb65ef655b700a8dea381265a3c1b622658
Author: Melg Eight <public.melg8@gmail.com>
Date:   Sun Apr 17 13:54:34 2022 +0300

    Fix spelling (#535)

    Signed-off-by: Melg Eight <public.melg8@gmail.com>

commit 5468eb659c8b4ecdb3d08e8b8f0442c5a2549a48
Author: Gabriel Arjones <arjones@arjones.com>
Date:   Thu Apr 14 17:55:27 2022 -0300

    cmake: write an arch independent version file (#534)
2022-04-21 12:11:26 +02:00
John Wellbelove
740e490aed Tested ETL traits code. 2022-03-11 20:28:26 +00:00
John Wellbelove
8872b9a0ae const_iterator parameters for containers 2021-11-20 19:04:39 +00:00
John Wellbelove
a3eda2c2e1 Added 'make' functions to construct containers
Added tests for 'make' and 'template deduction'
2021-11-08 19:05:59 +00:00
John Wellbelove
f3bf0dc7fe Disable etl::begin(), etl::end() and etl::size() for ETL_NO_STL 2021-10-20 13:34:44 +01:00
CanastraRF
7c0f169b66
literal with suffix (#416) 2021-08-23 11:01:18 +01:00
John Wellbelove
e44efd75a7 etl::basic_string::copy is now const and does not affect the 'truncated' flag. 2021-06-17 12:01:04 +01:00
John Wellbelove
dbfa71944f Abstracted unit test framework header 2021-03-05 13:52:34 +00:00
John Wellbelove
378e5cbd20 Added uninitialized_resize() tests to external buffer containers 2021-02-22 12:43:24 +00:00
John Wellbelove
ede5a91902 Added uninitialized_resize() 2021-02-22 09:33:12 +00:00
John Wellbelove
99c3bead5a Added data_end() and renamed trim() to trim_to_terminator() 2021-02-18 12:40:31 +00:00
John Wellbelove
7eaf3e13a7 Interface for C string handling. 2021-02-17 09:02:04 +00:00
John Wellbelove
0ee3574a14 Added update_size() to string API to fix string lengths after insertion of characters by C code. 2021-02-15 13:36:31 +00:00
John Wellbelove
a5ca678b77 Squashed commit of the following:
commit 638cceaf9c4a6964e58894adb36d633b01a1d5ac
Author: John Wellbelove <github@wellbelove.co.uk>
Date:   Wed Nov 25 17:57:06 2020 +0000

    Strings inherit secure status on copy.

commit 5f1ab55c61ed62b5c234b5e1d6ac3ef362b78851
Author: John Wellbelove <github@wellbelove.co.uk>
Date:   Tue Nov 24 22:33:08 2020 +0000

    Squashed commit of the following:

    commit dceb56dd1a19be6fe9b991bb50e08902eefe36a8
    Author: John Wellbelove <github@wellbelove.co.uk>
    Date:   Tue Nov 24 19:27:18 2020 +0000

        Fixed non-initialisation of in_use flag.

    commit c7ee1d6574ca5d95869152c5f8e4e6d02a7fa6bc
    Author: John Wellbelove <github@wellbelove.co.uk>
    Date:   Tue Nov 24 19:20:24 2020 +0000

        Fixed non-initialisation of in_use flag.

    commit 36cbf21cd1b67a28255582cfb4a188a601631ab2
    Author: John Wellbelove <github@wellbelove.co.uk>
    Date:   Tue Nov 24 18:52:53 2020 +0000

        Refactor buffer_descriptors test

    commit 49c60add63153bf53f400a891d8c4fb880cacda8
    Author: John Wellbelove <github@wellbelove.co.uk>
    Date:   Tue Nov 24 18:44:42 2020 +0000

        Refactor buffer_descriptors test

    commit 7bda7678311bf2eb497483f3ef27c3af9211680b
    Author: John Wellbelove <github@wellbelove.co.uk>
    Date:   Tue Nov 24 18:29:02 2020 +0000

        Refactor buffer_descriptors test

    commit 7a68c932a7df05f66690fa63e67365cf4b0619e8
    Author: John Wellbelove <github@wellbelove.co.uk>
    Date:   Tue Nov 24 18:14:30 2020 +0000

        Refactor buffer_descriptors test

    commit a9b25ac67d175f58751a2eb819f0e5822e8f0cf9
    Author: John Wellbelove <github@wellbelove.co.uk>
    Date:   Tue Nov 24 18:08:21 2020 +0000

        Refactor buffer_descriptors test

    commit 0c721c0466733751708fcbd995ce0bc1d7c0a932
    Author: John Wellbelove <github@wellbelove.co.uk>
    Date:   Tue Nov 24 17:58:22 2020 +0000

        Refactor buffer_descriptors test

    commit 4b2dd2fce22cd0a4846b95695fbfd812e0823540
    Author: John Wellbelove <github@wellbelove.co.uk>
    Date:   Tue Nov 24 17:47:43 2020 +0000

        Refactor buffer_descriptors test

    commit 80d5776c409b416377269d543bd539bdad83dc86
    Author: John Wellbelove <github@wellbelove.co.uk>
    Date:   Tue Nov 24 17:32:27 2020 +0000

        Refactor buffer_descriptors test

    commit 3564ac5b7ef89c41b240d9f54fce36042408daa0
    Author: John Wellbelove <github@wellbelove.co.uk>
    Date:   Tue Nov 24 17:17:50 2020 +0000

        Refactor buffer_descriptors test

    commit 297ef42c60e4228bfbcb2adcddeb6b8a617c4113
    Author: John Wellbelove <github@wellbelove.co.uk>
    Date:   Tue Nov 24 17:08:45 2020 +0000

        Refactor buffer_descriptors test

    commit 658d592c96eb7eaf1afb5d09fef38e293ea6f79b
    Author: John Wellbelove <github@wellbelove.co.uk>
    Date:   Tue Nov 24 16:58:52 2020 +0000

        Refactor buffer_descriptors test

    commit e97d8f90d5527349324ea84fd578c1d879d7a5a4
    Author: John Wellbelove <github@wellbelove.co.uk>
    Date:   Tue Nov 24 16:48:52 2020 +0000

        Refactor buffer_descriptors test

    commit ed783a8ccccc8673c0f55eb1780c08668880a745
    Author: John Wellbelove <github@wellbelove.co.uk>
    Date:   Tue Nov 24 16:43:52 2020 +0000

        clang.yml hack for testing

commit c26e42253f4502c3afb943a7ff1f7ef0f79c475b
Author: John Wellbelove <github@wellbelove.co.uk>
Date:   Tue Nov 24 19:32:48 2020 +0000

    Squashed commit of the following:

    commit dceb56dd1a19be6fe9b991bb50e08902eefe36a8
    Author: John Wellbelove <github@wellbelove.co.uk>
    Date:   Tue Nov 24 19:27:18 2020 +0000

        Fixed non-initialisation of in_use flag.

    commit c7ee1d6574ca5d95869152c5f8e4e6d02a7fa6bc
    Author: John Wellbelove <github@wellbelove.co.uk>
    Date:   Tue Nov 24 19:20:24 2020 +0000

        Fixed non-initialisation of in_use flag.

    commit 36cbf21cd1b67a28255582cfb4a188a601631ab2
    Author: John Wellbelove <github@wellbelove.co.uk>
    Date:   Tue Nov 24 18:52:53 2020 +0000

        Refactor buffer_descriptors test

    commit 49c60add63153bf53f400a891d8c4fb880cacda8
    Author: John Wellbelove <github@wellbelove.co.uk>
    Date:   Tue Nov 24 18:44:42 2020 +0000

        Refactor buffer_descriptors test

    commit 7bda7678311bf2eb497483f3ef27c3af9211680b
    Author: John Wellbelove <github@wellbelove.co.uk>
    Date:   Tue Nov 24 18:29:02 2020 +0000

        Refactor buffer_descriptors test

    commit 7a68c932a7df05f66690fa63e67365cf4b0619e8
    Author: John Wellbelove <github@wellbelove.co.uk>
    Date:   Tue Nov 24 18:14:30 2020 +0000

        Refactor buffer_descriptors test

    commit a9b25ac67d175f58751a2eb819f0e5822e8f0cf9
    Author: John Wellbelove <github@wellbelove.co.uk>
    Date:   Tue Nov 24 18:08:21 2020 +0000

        Refactor buffer_descriptors test

    commit 0c721c0466733751708fcbd995ce0bc1d7c0a932
    Author: John Wellbelove <github@wellbelove.co.uk>
    Date:   Tue Nov 24 17:58:22 2020 +0000

        Refactor buffer_descriptors test

    commit 4b2dd2fce22cd0a4846b95695fbfd812e0823540
    Author: John Wellbelove <github@wellbelove.co.uk>
    Date:   Tue Nov 24 17:47:43 2020 +0000

        Refactor buffer_descriptors test

    commit 80d5776c409b416377269d543bd539bdad83dc86
    Author: John Wellbelove <github@wellbelove.co.uk>
    Date:   Tue Nov 24 17:32:27 2020 +0000

        Refactor buffer_descriptors test

    commit 3564ac5b7ef89c41b240d9f54fce36042408daa0
    Author: John Wellbelove <github@wellbelove.co.uk>
    Date:   Tue Nov 24 17:17:50 2020 +0000

        Refactor buffer_descriptors test

    commit 297ef42c60e4228bfbcb2adcddeb6b8a617c4113
    Author: John Wellbelove <github@wellbelove.co.uk>
    Date:   Tue Nov 24 17:08:45 2020 +0000

        Refactor buffer_descriptors test

    commit 658d592c96eb7eaf1afb5d09fef38e293ea6f79b
    Author: John Wellbelove <github@wellbelove.co.uk>
    Date:   Tue Nov 24 16:58:52 2020 +0000

        Refactor buffer_descriptors test

    commit e97d8f90d5527349324ea84fd578c1d879d7a5a4
    Author: John Wellbelove <github@wellbelove.co.uk>
    Date:   Tue Nov 24 16:48:52 2020 +0000

        Refactor buffer_descriptors test

    commit ed783a8ccccc8673c0f55eb1780c08668880a745
    Author: John Wellbelove <github@wellbelove.co.uk>
    Date:   Tue Nov 24 16:43:52 2020 +0000

        clang.yml hack for testing

commit 3cbe1a80030263aac53616391fa434d0501f4f26
Author: John Wellbelove <github@wellbelove.co.uk>
Date:   Tue Nov 24 19:31:03 2020 +0000

    Squashed commit of the following:

    commit dceb56dd1a19be6fe9b991bb50e08902eefe36a8
    Author: John Wellbelove <github@wellbelove.co.uk>
    Date:   Tue Nov 24 19:27:18 2020 +0000

        Fixed non-initialisation of in_use flag.

    commit c7ee1d6574ca5d95869152c5f8e4e6d02a7fa6bc
    Author: John Wellbelove <github@wellbelove.co.uk>
    Date:   Tue Nov 24 19:20:24 2020 +0000

        Fixed non-initialisation of in_use flag.

    commit 36cbf21cd1b67a28255582cfb4a188a601631ab2
    Author: John Wellbelove <github@wellbelove.co.uk>
    Date:   Tue Nov 24 18:52:53 2020 +0000

        Refactor buffer_descriptors test

    commit 49c60add63153bf53f400a891d8c4fb880cacda8
    Author: John Wellbelove <github@wellbelove.co.uk>
    Date:   Tue Nov 24 18:44:42 2020 +0000

        Refactor buffer_descriptors test

    commit 7bda7678311bf2eb497483f3ef27c3af9211680b
    Author: John Wellbelove <github@wellbelove.co.uk>
    Date:   Tue Nov 24 18:29:02 2020 +0000

        Refactor buffer_descriptors test

    commit 7a68c932a7df05f66690fa63e67365cf4b0619e8
    Author: John Wellbelove <github@wellbelove.co.uk>
    Date:   Tue Nov 24 18:14:30 2020 +0000

        Refactor buffer_descriptors test

    commit a9b25ac67d175f58751a2eb819f0e5822e8f0cf9
    Author: John Wellbelove <github@wellbelove.co.uk>
    Date:   Tue Nov 24 18:08:21 2020 +0000

        Refactor buffer_descriptors test

    commit 0c721c0466733751708fcbd995ce0bc1d7c0a932
    Author: John Wellbelove <github@wellbelove.co.uk>
    Date:   Tue Nov 24 17:58:22 2020 +0000

        Refactor buffer_descriptors test

    commit 4b2dd2fce22cd0a4846b95695fbfd812e0823540
    Author: John Wellbelove <github@wellbelove.co.uk>
    Date:   Tue Nov 24 17:47:43 2020 +0000

        Refactor buffer_descriptors test

    commit 80d5776c409b416377269d543bd539bdad83dc86
    Author: John Wellbelove <github@wellbelove.co.uk>
    Date:   Tue Nov 24 17:32:27 2020 +0000

        Refactor buffer_descriptors test

    commit 3564ac5b7ef89c41b240d9f54fce36042408daa0
    Author: John Wellbelove <github@wellbelove.co.uk>
    Date:   Tue Nov 24 17:17:50 2020 +0000

        Refactor buffer_descriptors test

    commit 297ef42c60e4228bfbcb2adcddeb6b8a617c4113
    Author: John Wellbelove <github@wellbelove.co.uk>
    Date:   Tue Nov 24 17:08:45 2020 +0000

        Refactor buffer_descriptors test

    commit 658d592c96eb7eaf1afb5d09fef38e293ea6f79b
    Author: John Wellbelove <github@wellbelove.co.uk>
    Date:   Tue Nov 24 16:58:52 2020 +0000

        Refactor buffer_descriptors test

    commit e97d8f90d5527349324ea84fd578c1d879d7a5a4
    Author: John Wellbelove <github@wellbelove.co.uk>
    Date:   Tue Nov 24 16:48:52 2020 +0000

        Refactor buffer_descriptors test

    commit ed783a8ccccc8673c0f55eb1780c08668880a745
    Author: John Wellbelove <github@wellbelove.co.uk>
    Date:   Tue Nov 24 16:43:52 2020 +0000

        clang.yml hack for testing

commit e939e6b15557544bd0bb88d9862b5d5711170859
Author: John Wellbelove <github@wellbelove.co.uk>
Date:   Tue Nov 24 16:47:40 2020 +0000

    Refactor buffer_descriptors test

commit 4c4149abf6221f245aa4d73eb85e50319e7bd32c
Author: John Wellbelove <github@wellbelove.co.uk>
Date:   Tue Nov 24 16:45:53 2020 +0000

    clang hack for testing
2020-11-26 19:33:12 +00:00
John Wellbelove
bb21758cb6 string_ext 2020-11-20 12:05:41 +00:00
John Wellbelove
65fa8c51e4 Bitmapped flags & flags template class (unit tests unfinished) 2020-10-28 18:33:41 +00:00
John Wellbelove
25e353538a Initial string reduction code 2020-10-26 19:32:48 +00:00
John Wellbelove
6f3995a4e7 Refactor string initialise with external buffer 2020-09-19 01:04:44 +01:00
John Wellbelove
5a5579df7a cstring.h code moved to to string.h 2020-09-18 09:26:02 +01:00
John Wellbelove
f6ce3f59bd Allow strings with external buffers to use a pre-initialised buffer. 2020-09-15 19:51:06 +01:00
John Wellbelove
bc682c580c Merge branch 'hotfix/bug-when-self-merging-lists' into development 2020-05-11 15:15:10 +01:00
John Wellbelove
f4d9476900 Simplified conditional macros 2020-05-09 19:40:44 +01:00
Phillip Johnston
585251a870 Strings may use external buffers if the 'max size' template parameter is zero. 2020-05-09 13:08:19 +01:00
John Wellbelove
d55695e3d4 Strings may use external buffers if the 'max size' template parameter is zero. 2020-05-09 12:47:55 +01:00