File tree Expand file tree Collapse file tree 1 file changed +2
-10
lines changed
Expand file tree Collapse file tree 1 file changed +2
-10
lines changed Original file line number Diff line number Diff line change @@ -429,11 +429,7 @@ class CppStringT : public std::basic_string<CharT>
429429 */
430430 inline constexpr size_type rindex (const CppStringT& sub, const size_type start) const
431431 {
432- const size_type ret_value = rfind (sub, start);
433- if (size_type == CppStringT::npos)
434- throw NotFoundException (std::format (" substring \" {}\" not found in string \" {}\" " , sub, this ->c_str ()));
435- else
436- return ret_value;
432+ return rindex (sub, start, this ->size () - 1 );
437433 }
438434
439435 /* * Like rfind(sub), but raises NotFoundException when the substring is not found.
@@ -443,11 +439,7 @@ class CppStringT : public std::basic_string<CharT>
443439 */
444440 inline constexpr size_type rindex (const CppStringT& sub) const
445441 {
446- const size_type ret_value = rfind (sub);
447- if (size_type == CppStringT::npos)
448- throw NotFoundException (std::format (" substring \" {}\" not found in string \" {}\" " , sub, this ->c_str ()));
449- else
450- return ret_value;
442+ return rindex (sub, 0 , this ->size () - 1 );
451443 }
452444
453445
You can’t perform that action at this time.
0 commit comments