diff options
| author | 2025-02-28 02:00:57 +0000 | |
|---|---|---|
| committer | 2025-02-28 02:00:57 +0000 | |
| commit | 7ca99a5a00ffe943e23ca870fb22694f560b48e2 (patch) | |
| tree | 510800ed124f7d0497e1fba15c05280867184431 /include | |
| parent | Merge branch 'insp4' into master. (diff) | |
Replace insp::substring_view with the C++20 iterator constructor.
Diffstat (limited to 'include')
| -rw-r--r-- | include/utility/string.h | 14 |
1 files changed, 0 insertions, 14 deletions
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 <typename Iterator> - 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. */ |
