Evo C++ Library v0.5.1
Public Types | Public Member Functions | Public Attributes | List of all members
FmtString Struct Reference

#include <evo/impl/str.h>

Detailed Description

Explicitly format a string.

Public Types

typedef FmtString FmtFieldType
 This type paired with field info. More...
 
typedef ListBase< char, StrSizeTStringBase
 StringBase type. More...
 
typedef FmtString This
 This type More...
 

Public Member Functions

 FmtString (const char *str, FmtAlign align=fLEFT)
 Constructor. More...
 
 FmtString (const char *str, StrSizeT size, int width=-1, char ch=0)
 Constructor. More...
 
 FmtString (const char *str, StrSizeT size, FmtAlign align, int width=-1, char ch=0)
 Constructor. More...
 
 FmtString (const StringBase &str, int width=-1, char ch=0)
 Constructor. More...
 
 FmtString (const StringBase &str, FmtAlign align, int width=-1, char ch=0)
 Constructor. More...
 
 FmtString (const FmtString &str, FmtAlign align, int width, char ch=0)
 Constructor with override fields for compatibility with FmtFieldType. More...
 
Thiswidth (int width, char ch=0)
 Helper for setting padding attributes. More...
 

Public Attributes

FmtSetField fmt
 
StringBase str
 

Member Typedef Documentation

◆ FmtFieldType

This type paired with field info.

◆ StringBase

typedef ListBase<char,StrSizeT> StringBase

StringBase type.

◆ This

typedef FmtString This

This type

Constructor & Destructor Documentation

◆ FmtString() [1/6]

FmtString ( const char *  str,
FmtAlign  align = fLEFT 
)
inline

Constructor.

Parameters
strString pointer to format, must be terminated
alignAlignment type for string – see FmtAlign

◆ FmtString() [2/6]

FmtString ( const char *  str,
StrSizeT  size,
int  width = -1,
char  ch = 0 
)
inline

Constructor.

Parameters
strString pointer to format
sizeString size to format
widthWidth to format within, -1 for default
chPadding character to fill in width around string, 0 for default

◆ FmtString() [3/6]

FmtString ( const char *  str,
StrSizeT  size,
FmtAlign  align,
int  width = -1,
char  ch = 0 
)
inline

Constructor.

Parameters
strString pointer to format
sizeString size to format
alignAlignment type for string – see FmtAlign
widthWidth to format within, -1 for default
chPadding character to fill in width around string, 0 for default

◆ FmtString() [4/6]

FmtString ( const StringBase str,
int  width = -1,
char  ch = 0 
)
inline

Constructor.

Parameters
strString to format
widthWidth to format within, -1 for default
chPadding character to fill in width around string, 0 for default

◆ FmtString() [5/6]

FmtString ( const StringBase str,
FmtAlign  align,
int  width = -1,
char  ch = 0 
)
inline

Constructor.

Parameters
strString to format
alignAlignment type for string – see FmtAlign
widthWidth to format within, -1 for default
chPadding character to fill in width around string, 0 for default

◆ FmtString() [6/6]

FmtString ( const FmtString str,
FmtAlign  align,
int  width,
char  ch = 0 
)
inline

Constructor with override fields for compatibility with FmtFieldType.

Parameters
strString to format
alignAlignment type for string – see FmtAlign
widthWidth to format within, -1 for default
chPadding character to fill in width around string, 0 for default

Member Function Documentation

◆ width()

This& width ( int  width,
char  ch = 0 
)
inline

Helper for setting padding attributes.

Parameters
widthWidth to format within, -1 for default
chPadding character to fill in width around string, 0 for default
Returns
This

Member Data Documentation

◆ fmt

◆ str


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