XLE  v0.02.0
Public Member Functions | Public Attributes | List of all members
Utility::StringSection< CharType > Class Template Reference

Pointers to the start and end of a string More...

#include <StringUtils.h>

Public Member Functions

size_t Length () const
 
bool Empty () const
 
std::basic_string< CharType > AsString () const
 
const CharType * begin () const
 
const CharType * end () const
 
const CharType & operator[] (size_t index) const
 
 StringSection (const CharType *start, const CharType *end)
 
 StringSection (const CharType *nullTerm)
 
 StringSection (const std::basic_string< CharType > &str)
 

Public Attributes

const CharType * _start
 
const CharType * _end
 

Detailed Description

template<typename CharType = char>
class Utility::StringSection< CharType >

Pointers to the start and end of a string

This object points into the interior of another object, identifying the start and end of a string.

This is a 3rd common string representation:

This useful for separating a part of a large string, or while serializing from an text file (when we want to identify an interior string without requiring an extra allocation).


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