[libc] add internal string class
authorMichael Jones <michaelrj@google.com>
Fri, 6 Jan 2023 23:00:51 +0000 (15:00 -0800)
committerMichael Jones <michaelrj@google.com>
Thu, 19 Jan 2023 17:26:22 +0000 (09:26 -0800)
commit176c853d1da5c344194952659eeb74f063e13010
tree8d6f1cc1790f51c423f50e3b16c92fbda1ae8c48
parenteef0210706bc16ffde17d5b574799d8aae705790
[libc] add internal string class

The scanf implementation needs a dynamically resizing string class. This
patch adds a minimal version of that class along with tests to check the
current functionality.

Reviewed By: sivachandra

Differential Revision: https://reviews.llvm.org/D141162
libc/src/__support/CMakeLists.txt
libc/src/__support/char_vector.h [new file with mode: 0644]
libc/test/src/__support/CMakeLists.txt
libc/test/src/__support/CPP/stringview_test.cpp
libc/test/src/__support/char_vector_test.cpp [new file with mode: 0644]