6 Commits

Author SHA1 Message Date
Andrey Semashev
c63d36cf5b Added string_view::contains methods.
These methods were added in C++23.

Also updated string_view/ref tests:

- Added tests for string_view::contains.
- Added missing includes.
- Added missing std:: qualification.
- Removed tabs.
- Fixed misleading indentation (fixes gcc warnings).
- Fixed decrementing pointer before beginning of the string.

Closes https://github.com/boostorg/utility/issues/93.
2022-05-04 00:32:30 +03:00
Marshall Clow
db05c11f50 Fix string_ref::find/rfind's handling of empty strings. Thanks to 'reluctantbugreporter' for the bug report 2018-09-14 09:48:13 -07:00
Glen Fernandes
f8a243bcff Utility tests should use lightweight_test instead of test 2017-12-23 13:00:33 -05:00
Andrey Semashev
3d853b0e83 Reworked to_string test to verify the overload with a custom allocator even when explicit conversion operators are not supported. Made the custom allocator more standard-compliant. 2016-09-01 22:42:29 +03:00
gnaggnoyil
e5932ebb08 fix compile error on basic_string_view::to_string when Allocator is user-defined 2016-09-01 21:56:20 +03:00
Marshall Clow
1caa745dd7 Introduce new 'string_view' to match the one in the standard. Step #2 (up next) is to retire string_ref in favor of string_view 2015-12-21 11:39:59 -08:00