Home  · Classes  · Annotated Classes  · Modules  · Members  · Namespaces  · Related Pages
Public Member Functions | Private Attributes | List of all members
StringView Class Reference

StringView provides a non-owning view on an existing string. More...

#include <OpenMS/DATASTRUCTURES/String.h>

Public Member Functions

 StringView ()
 
 StringView (const std::string &s)
 
 StringView (const StringView &s)
 
bool operator< (const StringView other) const
 less operator More...
 
StringView substr (Size start_index, Size end_index) const
 create view that references a substring of the original string More...
 
Size size () const
 size of view More...
 
String getString () const
 create String object from view More...
 

Private Attributes

const char * begin_
 
Size size_
 

Detailed Description

StringView provides a non-owning view on an existing string.

Minimal replacement for boost::string_ref or std::experimental::string_view until we increase our min boost version

Constructor & Destructor Documentation

StringView ( )
inline
StringView ( const std::string &  s)
inline
StringView ( const StringView &  s)
inline

Member Function Documentation

String getString ( ) const
inline

create String object from view

bool operator< ( const StringView  other) const
inline

less operator

References StringView::begin_, and StringView::size_.

Size size ( ) const
inline

size of view

StringView substr ( Size  start_index,
Size  end_index 
) const
inline

create view that references a substring of the original string

References StringView::begin_, and StringView::size_.

Member Data Documentation

const char* begin_
private
Size size_
private

OpenMS / TOPP release 2.0.0 Documentation generated on Tue Jan 31 2017 06:40:49 using doxygen 1.8.8