libGimbal 0.1.0
C17-Based Extended Standard Library and Cross-Language Runtime Framework
Loading...
Searching...
No Matches
gimbal::StringView Class Referencefinal
Inheritance diagram for gimbal::StringView:
gimbal::StringViewBase< StringView > gimbal::tags::StringBase

Public Member Functions

 StringView (const GblStringBuffer &gblStr)
 
 StringView (const gimbal::String &string)
 
 StringView (const GblStringBuffer *pGblStringBuffer)
 
const GblStringBuffergetString_ (void) const
 
bool isValid (void) const
 
- Public Member Functions inherited from gimbal::StringViewBase< StringView >
 operator const GblStringBuffer * () const
 
const char & getElement_ (size_t index) const
 
char & getElement_ (size_t index)
 
void setElement_ (size_t index, char value)
 
size_t getElementCount_ (void) const
 
Size getStackBytes (void) const
 
constexpr Size getLength (void) const
 
constexpr Size getCapacity (void) const
 
ContextgetContext (void) const
 
constexpr bool isEmpty (void) const
 
constexpr bool isStack (void) const
 
constexpr bool isHeap (void) const
 
const char * getCString (void) const
 
char * getCString (void)
 
std::string toStdString (void) const
 
constexpr std::string_view toStringView (void) const
 

Additional Inherited Members

- Public Types inherited from gimbal::StringViewBase< StringView >
using StringViewType = StringViewBase< StringView >
 
using Derived = StringView
 
using Iterable = RandomAccessIterable< StringViewType, size_t, char >
 
using iterator = typename Iterable::iterator
 
using const_iterator = typename Iterable::const_iterator
 
- Protected Member Functions inherited from gimbal::StringViewBase< StringView >
decltype(auto) str_ (void) const
 
decltype(auto) str_ (void)
 

Detailed Description

Definition at line 166 of file gimbal_string.hpp.

Constructor & Destructor Documentation

◆ StringView() [1/3]

gimbal::StringView::StringView ( const GblStringBuffer gblStr)
inline

Definition at line 172 of file gimbal_string.hpp.

172 :
173 pGblStr_(&gblStr) {}

◆ StringView() [2/3]

gimbal::StringView::StringView ( const gimbal::String string)
inline

Definition at line 424 of file gimbal_string.hpp.

424 :
425 StringView(static_cast<const GblStringBuffer&>(string)) {}
Mutable string type optimized for building and writing.

◆ StringView() [3/3]

gimbal::StringView::StringView ( const GblStringBuffer pGblStringBuffer)
inline

Definition at line 177 of file gimbal_string.hpp.

177 :
178 pGblStr_(pGblStringBuffer) {}

Member Function Documentation

◆ getString_()

const GblStringBuffer * gimbal::StringView::getString_ ( void  ) const
inline

Definition at line 180 of file gimbal_string.hpp.

180{ return pGblStr_; }

◆ isValid()

bool gimbal::StringView::isValid ( void  ) const
inline

Definition at line 181 of file gimbal_string.hpp.

181{ return pGblStr_; }

The documentation for this class was generated from the following file: