[libc-commits] [PATCH] D141162: [libc] add internal string class
Siva Chandra via Phabricator via libc-commits
libc-commits at lists.llvm.org
Wed Jan 18 14:32:49 PST 2023
sivachandra added inline comments.
================
Comment at: libc/src/__support/CPP/vector_string.h:24
+
+class VectorString {
+ static constexpr size_t INIT_BUFF_SIZE = 64;
----------------
michaelrj wrote:
> sivachandra wrote:
> > michaelrj wrote:
> > > sivachandra wrote:
> > > > Shouldn't this be named `string`?
> > > I talked about it in my comment on the patch this was split out of but basically it has some differences from `std::string` that might warrant a different name.
> > Ah, sorry! I did not look at that patch yet.
> >
> > Going by your explanation, what you have done previously is correct - Keep is `scanf` specific as we cannot add non-standard API in the `CPP` directory. Instead of `VectorString`, may be call it `CharVector`.
> If we do want it to be `CharVector` it might be better as a general utility in the `__support` directory since I could see other functions using it. Additionally that makes the unit testing easier.
SGTM
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D141162/new/
https://reviews.llvm.org/D141162
More information about the libc-commits
mailing list