[clang-tools-extra] [clang-tidy] Enhance modernize-use-starts-ends-with to handle substr patterns (PR #116033)
Nicolas van Kempen via cfe-commits
cfe-commits at lists.llvm.org
Fri Nov 15 13:08:45 PST 2024
================
@@ -59,6 +59,7 @@ struct basic_string {
_Type& insert(size_type pos, const _Type& str);
_Type& insert(size_type pos, const C* s);
_Type& insert(size_type pos, const C* s, size_type n);
+ _Type substr(size_type pos = 0, size_type count = npos) const;
----------------
nicovank wrote:
```suggestion
_Type substr(size_type pos = 0, size_type count = npos) const;
```
Just to separate it from the `insert` methods.
https://github.com/llvm/llvm-project/pull/116033
More information about the cfe-commits
mailing list