oa::String

String class in the OA Core public surface.

Public Methods

String & oa::String::append(const char * inS)
String & oa::String::append(oa::StringView inV)
char & oa::String::at(size_type inIdx)
const char & oa::String::at(size_type inIdx)
char & oa::String::back()
const char & oa::String::back()
char * oa::String::begin()
const char * oa::String::begin()
size_type oa::String::capacity()
void oa::String::clear()
int oa::String::compare(const String & inO)
int oa::String::compare(oa::StringView inV)
const char * oa::String::cStr()
const char * oa::String::data()
bool oa::String::empty()
char * oa::String::end()
const char * oa::String::end()
bool oa::String::equals(const String & inO)
bool oa::String::equals(oa::StringView inV)
size_type oa::String::erase(size_type inPos = 0, size_type inCount = Npos)
size_type oa::String::find(char inCh, size_type inPos = 0)
size_type oa::String::find(const char * inS, size_type inPos = 0)
size_type oa::String::find(oa::StringView inNeedle, size_type inPos = 0)
char & oa::String::front()
const char & oa::String::front()
size_type oa::String::length()
oa::StringView oa::String::operator StringView()
String & oa::String::operator+=(char inCh)
String & oa::String::operator+=(const String & inO)
String & oa::String::operator+=(const char * inS)
String & oa::String::operator+=(oa::StringView inV)
char & oa::String::operator[](size_type inIdx)
const char & oa::String::operator[](size_type inIdx)
void oa::String::popBack()
void oa::String::pushBack(char inCh)
void oa::String::reserve(size_type inCap)
void oa::String::resize(size_type inN)
void oa::String::resize(size_type inN, char inCh)
void oa::String::secureWipeSecrets()
size_type oa::String::size()
String oa::String::substr(size_type inPos = 0, size_type inCount = Npos)
oa::StringView oa::String::view()

Public Data Members

Nposconst size_typestatic
SsoCapconst size_typestatic

Constructor & Destructor Documentation

oa::String::String()
No public source comment is attached to this declaration.
oa::String::String( const char * inCStr )
No public source comment is attached to this declaration.

Parameters

inCStr
const char *

oa::String::String( const char * inData, size_type inLen )
No public source comment is attached to this declaration.

Parameters

inData
const char *

inLen
size_type

oa::String::String( oa::StringView inV )
No public source comment is attached to this declaration.

Parameters

inV
oa::StringView

void oa::String::~String()
No public source comment is attached to this declaration.

Public Method Documentation

String & oa::String::append( const char * inS )
No public source comment is attached to this declaration.

Parameters

inS
const char *

Returns

String &

The declared return value.

String & oa::String::append( oa::StringView inV )
No public source comment is attached to this declaration.

Parameters

inV
oa::StringView

Returns

String &

The declared return value.

char & oa::String::at( size_type inIdx )
No public source comment is attached to this declaration.

Parameters

inIdx
size_type

Returns

char &

The declared return value.

const char & oa::String::at( size_type inIdx )
No public source comment is attached to this declaration.

Parameters

inIdx
size_type

Returns

const char &

The declared return value.

char & oa::String::back()
No public source comment is attached to this declaration.

Returns

char &

The declared return value.

const char & oa::String::back()
No public source comment is attached to this declaration.

Returns

const char &

The declared return value.

char * oa::String::begin()
Member begin/end so range-for mutates this string (free begin(oa::StringView) would not).

Returns

char *

The declared return value.

const char * oa::String::begin()
No public source comment is attached to this declaration.

Returns

const char *

The declared return value.

size_type oa::String::capacity()
No public source comment is attached to this declaration.

Returns

size_type

The declared return value.

void oa::String::clear()
No public source comment is attached to this declaration.

Returns

void

The declared return value.

int oa::String::compare( const String & inO )
No public source comment is attached to this declaration.

Parameters

inO
const String &

Returns

int

The declared return value.

int oa::String::compare( oa::StringView inV )
Lexicographic ordering (unsigned char semantics via memcmp).

Parameters

inV
oa::StringView

Returns

int

The declared return value.

const char * oa::String::cStr()
No public source comment is attached to this declaration.

Returns

const char *

The declared return value.

const char * oa::String::data()
No public source comment is attached to this declaration.

Returns

const char *

The declared return value.

bool oa::String::empty()
No public source comment is attached to this declaration.

Returns

bool

The declared return value.

char * oa::String::end()
No public source comment is attached to this declaration.

Returns

char *

The declared return value.

const char * oa::String::end()
No public source comment is attached to this declaration.

Returns

const char *

The declared return value.

bool oa::String::equals( const String & inO )
No public source comment is attached to this declaration.

Parameters

inO
const String &

Returns

bool

The declared return value.

bool oa::String::equals( oa::StringView inV )
No public source comment is attached to this declaration.

Parameters

inV
oa::StringView

Returns

bool

The declared return value.

size_type oa::String::erase( size_type inPos = 0, size_type inCount = Npos )
Mirrors std::string::erase(pos, count); returns index of character after erased range.

Parameters

inPos
size_type

Default: 0

inCount
size_type

Default: Npos

Returns

size_type

The declared return value.

size_type oa::String::find( char inCh, size_type inPos = 0 )
No public source comment is attached to this declaration.

Parameters

inCh
char

inPos
size_type

Default: 0

Returns

size_type

The declared return value.

size_type oa::String::find( const char * inS, size_type inPos = 0 )
No public source comment is attached to this declaration.

Parameters

inS
const char *

inPos
size_type

Default: 0

Returns

size_type

The declared return value.

size_type oa::String::find( oa::StringView inNeedle, size_type inPos = 0 )
No public source comment is attached to this declaration.

Parameters

inNeedle
oa::StringView

inPos
size_type

Default: 0

Returns

size_type

The declared return value.

char & oa::String::front()
No public source comment is attached to this declaration.

Returns

char &

The declared return value.

const char & oa::String::front()
No public source comment is attached to this declaration.

Returns

const char &

The declared return value.

size_type oa::String::length()
No public source comment is attached to this declaration.

Returns

size_type

The declared return value.

oa::StringView oa::String::operator StringView()
Converts to view into this string; do not store the view past the string's lifetime.

Returns

oa::StringView

The declared return value.

String & oa::String::operator+=( char inCh )
No public source comment is attached to this declaration.

Parameters

inCh
char

Returns

String &

The declared return value.

String & oa::String::operator+=( const String & inO )
No public source comment is attached to this declaration.

Parameters

inO
const String &

Returns

String &

The declared return value.

String & oa::String::operator+=( const char * inS )
No public source comment is attached to this declaration.

Parameters

inS
const char *

Returns

String &

The declared return value.

String & oa::String::operator+=( oa::StringView inV )
Operator overloading

Parameters

inV
oa::StringView

Returns

String &

The declared return value.

char & oa::String::operator[]( size_type inIdx )
No public source comment is attached to this declaration.

Parameters

inIdx
size_type

Returns

char &

The declared return value.

const char & oa::String::operator[]( size_type inIdx )
No public source comment is attached to this declaration.

Parameters

inIdx
size_type

Returns

const char &

The declared return value.

void oa::String::popBack()
No public source comment is attached to this declaration.

Returns

void

The declared return value.

void oa::String::pushBack( char inCh )
No public source comment is attached to this declaration.

Parameters

inCh
char

Returns

void

The declared return value.

void oa::String::reserve( size_type inCap )
No public source comment is attached to this declaration.

Parameters

inCap
size_type

Returns

void

The declared return value.

void oa::String::resize( size_type inN )
No public source comment is attached to this declaration.

Parameters

inN
size_type

Returns

void

The declared return value.

void oa::String::resize( size_type inN, char inCh )
NOLINTNEXTLINE(bugprone-easily-swappable-parameters) — mirrors std::string::resize(n, ch)

Parameters

inN
size_type

inCh
char

Returns

void

The declared return value.

void oa::String::secureWipeSecrets()
Zero the entire owned character allocation, including unused capacity and the terminator, before releasing storage.

Returns

void

The declared return value.

size_type oa::String::size()
No public source comment is attached to this declaration.

Returns

size_type

The declared return value.

String oa::String::substr( size_type inPos = 0, size_type inCount = Npos )
No public source comment is attached to this declaration.

Parameters

inPos
size_type

Default: 0

inCount
size_type

Default: Npos

Returns

String

The declared return value.

oa::StringView oa::String::view()
No public source comment is attached to this declaration.

Returns

oa::StringView

The declared return value.