ULIS  dev4.0.7
Utility Library for Imaging Systems
Public Types | Public Member Functions | Static Public Member Functions | List of all members
FString Class Reference

The FString class provides a simple dynamic string class. More...

Public Types

typedef char char_type
 

Public Member Functions

 FString ()
 
 FString (const char_type *iStr)
 
 FString (const FString &iStr)
 
 FString (const FWString &iWStr)
 
 FString (FString &&iStr)
 
 ~FString ()
 
FStringAppend (char_type iChar)
 
FStringAppend (const char_type *iStr)
 
FStringAppend (const FString &iStr)
 
char_typeAt (uint64 iIndex)
 
const char_typeAt (uint64 iIndex) const
 
char_typeBack ()
 
const char_typeBack () const
 
uint64 Capacity () const
 
void Clear ()
 
FString Copy () const
 
uint32 CRC32 () const
 
const char_typeData () const
 
FStringErase (uint64 iPos, uint64 iCount)
 
int64 FindFirst (const FString &iStr) const
 
int64 FindFrom (uint64 iPos, const FString &iStr) const
 
int64 FindLast (const FString &iStr) const
 
char_typeFront ()
 
const char_typeFront () const
 
FStringInsert (uint64 iPos, const FString &iStr)
 
bool IsEmpty () const
 
bool operator!= (const FString &iOther) const
 
FStringoperator+= (const char_type *iOther)
 
FStringoperator+= (const FString &iOther)
 
FStringoperator= (const FString &iStr)
 
FStringoperator= (FString &&iStr)
 
bool operator== (const FString &iOther) const
 
char_typeoperator[] (uint64 iIndex)
 
const char_typeoperator[] (uint64 iIndex) const
 
FStringPrepend (char_type iChar)
 
FStringPrepend (const char_type *iStr)
 
FStringPrepend (const FString &iStr)
 
void ReplaceAll (const FString &iA, const FString &iB)
 
bool ReplaceFirst (const FString &iA, const FString &iB)
 
bool ReplaceFrom (uint64 iPos, const FString &iA, const FString &iB)
 
bool ReplaceLast (const FString &iA, const FString &iB)
 
void Reserve (uint64 iCapacity)
 
void Resize (uint64 iSize, char_type iChar=char_type())
 
void Shrink ()
 
uint64 Size () const
 
TArray< FStringSplit (const FString &iSep) const
 
FString SubString (uint64 iPos, uint64 iCount) const
 
double ToDouble () const
 
float ToFloat () const
 
int ToInt () const
 
FString ToLower () const
 
unsigned int ToUnsignedInt () const
 
FString ToUpper () const
 
FWString ToWString () const
 
FStringTransformLowerCase ()
 
FStringTransformUpperCase ()
 

Static Public Member Functions

static FString FromDouble (double iValue)
 
static FString FromFloat (float iValue)
 
static FString FromInt (int iValue)
 
static FString FromUnsignedInt (unsigned int iValue)
 
static FString FromWString (const FWString &iValue)
 

Detailed Description

The need of a custom FString class rose from the fact that std:: classes cannot be exported easily accross dll boundaries when ULIS is compiled as a shared library.

See also
FWString

Member Typedef Documentation

◆ char_type

typedef char FString::char_type

Constructor & Destructor Documentation

◆ ~FString()

FString::~FString ( )

◆ FString() [1/5]

FString::FString ( )

◆ FString() [2/5]

FString::FString ( const char_type iStr)

◆ FString() [3/5]

FString::FString ( const FString iStr)

◆ FString() [4/5]

FString::FString ( FString &&  iStr)

◆ FString() [5/5]

FString::FString ( const FWString iWStr)

Member Function Documentation

◆ Append() [1/3]

FString& FString::Append ( char_type  iChar)

Append a char.

◆ Append() [2/3]

FString& FString::Append ( const char_type iStr)

Append a string.

◆ Append() [3/3]

FString& FString::Append ( const FString iStr)

Append a string.

◆ At() [1/2]

char_type& FString::At ( uint64  iIndex)

Access char_type at index.

◆ At() [2/2]

const char_type& FString::At ( uint64  iIndex) const

Access const char_type at index.

◆ Back() [1/2]

char_type& FString::Back ( )

Access char_type at back.

◆ Back() [2/2]

const char_type& FString::Back ( ) const

Access const char_type at back.

◆ Capacity()

uint64 FString::Capacity ( ) const

Returns the string capacity.

◆ Clear()

void FString::Clear ( )

Clear the string, deallocating everything.

◆ Copy()

FString FString::Copy ( ) const

◆ CRC32()

uint32 FString::CRC32 ( ) const

◆ Data()

const char_type* FString::Data ( ) const

Returns the const raw storage.

◆ Erase()

FString& FString::Erase ( uint64  iPos,
uint64  iCount 
)

◆ FindFirst()

int64 FString::FindFirst ( const FString iStr) const

◆ FindFrom()

int64 FString::FindFrom ( uint64  iPos,
const FString iStr 
) const

◆ FindLast()

int64 FString::FindLast ( const FString iStr) const

◆ FromDouble()

static FString FString::FromDouble ( double  iValue)
static

◆ FromFloat()

static FString FString::FromFloat ( float  iValue)
static

◆ FromInt()

static FString FString::FromInt ( int  iValue)
static

◆ FromUnsignedInt()

static FString FString::FromUnsignedInt ( unsigned int  iValue)
static

◆ FromWString()

static FString FString::FromWString ( const FWString iValue)
static

◆ Front() [1/2]

char_type& FString::Front ( )

Access char_type at front.

◆ Front() [2/2]

const char_type& FString::Front ( ) const

Access const char_type at front.

◆ Insert()

FString& FString::Insert ( uint64  iPos,
const FString iStr 
)

◆ IsEmpty()

bool FString::IsEmpty ( ) const

Returns wether the array is empty or not.

◆ operator!=()

bool FString::operator!= ( const FString iOther) const

◆ operator+=() [1/2]

FString& FString::operator+= ( const char_type iOther)

◆ operator+=() [2/2]

FString& FString::operator+= ( const FString iOther)

◆ operator=() [1/2]

FString& FString::operator= ( const FString iStr)

◆ operator=() [2/2]

FString& FString::operator= ( FString &&  iStr)

◆ operator==()

bool FString::operator== ( const FString iOther) const

◆ operator[]() [1/2]

char_type& FString::operator[] ( uint64  iIndex)

Access char_type at index.

◆ operator[]() [2/2]

const char_type& FString::operator[] ( uint64  iIndex) const

Access const char_type at index.

◆ Prepend() [1/3]

FString& FString::Prepend ( char_type  iChar)

Prepend a char.

◆ Prepend() [2/3]

FString& FString::Prepend ( const char_type iStr)

Prepend a string.

◆ Prepend() [3/3]

FString& FString::Prepend ( const FString iStr)

Prepend a string.

◆ ReplaceAll()

void FString::ReplaceAll ( const FString iA,
const FString iB 
)

◆ ReplaceFirst()

bool FString::ReplaceFirst ( const FString iA,
const FString iB 
)

◆ ReplaceFrom()

bool FString::ReplaceFrom ( uint64  iPos,
const FString iA,
const FString iB 
)

◆ ReplaceLast()

bool FString::ReplaceLast ( const FString iA,
const FString iB 
)

◆ Reserve()

void FString::Reserve ( uint64  iCapacity)

Reserve some capacity for future usage, if iCapacity is bigger than the current capacity. If iCapacity is lower or equal to capacity, this function does nothing. This function might invalid the underlying buffer. The size doesn't change.

◆ Resize()

void FString::Resize ( uint64  iSize,
char_type  iChar = char_type() 
)

Resize the actual usage size of the container. This function might invalid the underlying buffer.

◆ Shrink()

void FString::Shrink ( )

Shrink the capacity to fit the size. If the capacity is already the same as the size, the function does nothing. This function might invalid the underlying buffer. The size doesn't change.

◆ Size()

uint64 FString::Size ( ) const

Returns the string size.

◆ Split()

TArray< FString > FString::Split ( const FString iSep) const

Split the string.

◆ SubString()

FString FString::SubString ( uint64  iPos,
uint64  iCount 
) const

◆ ToDouble()

double FString::ToDouble ( ) const

◆ ToFloat()

float FString::ToFloat ( ) const

◆ ToInt()

int FString::ToInt ( ) const

◆ ToLower()

FString FString::ToLower ( ) const

◆ ToUnsignedInt()

unsigned int FString::ToUnsignedInt ( ) const

◆ ToUpper()

FString FString::ToUpper ( ) const

◆ ToWString()

FWString FString::ToWString ( ) const

Convert to WString.

◆ TransformLowerCase()

FString& FString::TransformLowerCase ( )

◆ TransformUpperCase()

FString& FString::TransformUpperCase ( )