From 7ca99a5a00ffe943e23ca870fb22694f560b48e2 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Fri, 28 Feb 2025 02:00:57 +0000 Subject: Replace insp::substring_view with the C++20 iterator constructor. --- include/utility/string.h | 14 -------------- 1 file changed, 14 deletions(-) (limited to 'include') diff --git a/include/utility/string.h b/include/utility/string.h index 8ed918474..dc432b0f2 100644 --- a/include/utility/string.h +++ b/include/utility/string.h @@ -44,20 +44,6 @@ namespace insp return joined; } - /** Creates a view of a subsection of a string. - * @param str The string to create a view of. - * @param begin The position within the string to start the view at. - * @param end The position within the string to end the view at. - */ - template - std::string_view substring_view(const std::string& str, Iterator begin, Iterator end) - { - std::string_view sv = str; - sv.remove_prefix(std::distance(str.begin(), begin)); - sv.remove_suffix(std::distance(end, str.end())); - return sv; - } - /** Get underlying C string of the string passed as parameter. Useful in template functions. * @param str A `const char*` string. */ -- cgit v1.3.1-10-gc9f91