10#ifndef MCGIDI_STRING_HPP
11#define MCGIDI_STRING_HPP
113 size_t delta = allocated_;
114 size_t sub = delta % 8;
115 if (sub != 0) delta += (8-sub);
116 return delta *
sizeof(char);
LUPI_HOST_DEVICE size_t internalSize() const
static const size_type npos
LUPI_HOST_DEVICE int compare(size_type pos, size_type len, const String &str) const
LUPI_HOST_DEVICE char & operator[](const size_type i)
LUPI_HOST_DEVICE bool operator==(const char *) const
LUPI_HOST_DEVICE String & append(const char *str, size_type n)
Append n characters of a string.
LUPI_HOST_DEVICE String & erase(size_type pos, size_type len)
erase len characters at position pos
LUPI_HOST_DEVICE String & operator+=(const String &)
LUPI_HOST_DEVICE void clear()
LUPI_HOST_DEVICE char operator[](const size_type i) const
LUPI_HOST_DEVICE char & at(const size_type i)
LUPI_HOST_DEVICE void swap(String &)
swap contents
friend String LUPI_HOST_DEVICE operator+(const String &lhs, const String &rhs)
LUPI_HOST_DEVICE String & operator=(const char *)
LUPI_HOST_DEVICE size_type capacity() const
LUPI_HOST_DEVICE String substr(const size_type pos, size_type length) const
LUPI_HOST_DEVICE void resize(size_type n, char **address=nullptr)
LUPI_HOST_DEVICE bool empty() const
LUPI_HOST_DEVICE size_type size() const
size without terminating NUL
LUPI_HOST_DEVICE const char * c_str() const
raw data
LUPI_HOST_DEVICE String()
LUPI_HOST_DEVICE size_type length() const
as size()
LUPI_HOST_DEVICE void reserve(size_type n, char **address=nullptr)
LUPI_HOST_DEVICE void clearMemory()
LUPI_HOST_DEVICE ~String()
LUPI_HOST_DEVICE void push_back(char)
Simple C++ string class, useful as replacement for std::string if this cannot be used,...
LUPI_HOST_DEVICE bool operator<(const String &, const String &)