verbatimString Class Reference

A class for handling verbatimStrings, derived from string. More...

Inheritance diagram for verbatimString:
Collaboration diagram for verbatimString:

Public Member Functions

 verbatimString ()
 Construct null. More...
 
 verbatimString (const verbatimString &)
 Copy constructor. More...
 
 verbatimString (const char *)
 Copy constructor of character array. More...
 
 verbatimString (const string &)
 Copy constructor of string. More...
 
 verbatimString (const std::string &)
 Copy constructor of std::string. More...
 
 verbatimString (Istream &)
 Construct from Istream. More...
 
void operator= (const verbatimString &)
 
void operator= (const string &)
 
void operator= (const std::string &)
 
void operator= (const char *)
 
- Public Member Functions inherited from string
 string ()
 Construct null. More...
 
 string (const std::string &)
 Construct from std::string. More...
 
 string (const string &)
 Copy constructor. More...
 
 string (string &&)
 Move constructor. More...
 
 string (const char *)
 Construct as copy of character array. More...
 
 string (const UList< char > &)
 Construct as copy of UList of character. More...
 
 string (const char *, const size_type)
 Construct as copy of specified number of characters. More...
 
 string (const char)
 Construct from a single character. More...
 
 string (const size_type, const char)
 Construct from copies of a single character. More...
 
 string (Istream &)
 Construct from Istream. More...
 
size_type count (const char) const
 Count and return the number of a given character in the string. More...
 
bool match (const std::string &) const
 True when strings match literally. More...
 
stringreplace (const string &oldStr, const string &newStr, size_type start=0)
 In this string replace first occurrence of sub-string oldStr. More...
 
string replace (const string &oldStr, const string &newStr, size_type start=0) const
 Replace first occurrence of sub-string oldStr with newStr. More...
 
stringreplaceAll (const string &oldStr, const string &newStr, size_type start=0)
 In this string replace all occurrences of sub-string oldStr. More...
 
string replaceAll (const string &oldStr, const string &newStr, size_type start=0) const
 Replace all occurrences of sub-string oldStr with newStr. More...
 
stringexpand (const bool allowEmpty=false)
 Expand initial tildes and all occurrences of environment variables. More...
 
bool remove (const char)
 Remove all occurrences of character returning true if string changed. More...
 
string remove (const char) const
 Remove all occurrences of character and return the string. More...
 
bool removeRepeated (const char)
 Remove repeated character returning true if string changed. More...
 
string removeRepeated (const char) const
 Remove repeated character and return the string. More...
 
bool removeTrailing (const char)
 Remove trailing character returning true if string changed. More...
 
string removeTrailing (const char) const
 Return string with trailing character removed. More...
 
bool removeTrailing (const string &)
 Remove trailing string returning true if string changed. More...
 
string removeTrailing (const string &) const
 Return string with trailing string removed. More...
 
void strip (const string &)
 Strip characters from the start and end of the string. More...
 
size_type findClosing (const char, const size_type) const
 Find the closing character. Brackets counting algorithm. The. More...
 
string operator() (const size_type i, const size_type n) const
 Return the sub-string from the i-th character for n characters. More...
 
string operator() (const size_type n) const
 Return the sub-string from the first character for n characters. More...
 
void operator= (const string &)
 
void operator= (string &&)
 
template<class String >
Foam::string quotemeta (const string &str, const char quote)
 

Static Public Attributes

static const char *const typeName = "verbatimString"
 
static int debug
 
static const verbatimString null
 An empty verbatimString. More...
 
- Static Public Attributes inherited from string
static const char *const typeName = "string"
 
static int debug
 
static const string null
 An empty string. More...
 

Friends

Istreamoperator>> (Istream &, verbatimString &)
 
Ostreamoperator<< (Ostream &, const verbatimString &)
 

Additional Inherited Members

- Static Public Member Functions inherited from string
template<class String >
static bool valid (const string &)
 Is this string type valid? More...
 
template<class String >
static bool meta (const string &, const char quote='\\')
 Does this string have particular meta-characters? More...
 
template<class String >
static bool stripInvalid (string &)
 Strip invalid characters from the given string. More...
 
template<class String >
static String validate (const string &)
 Return a valid String from the given string. More...
 
template<class String >
static string quotemeta (const string &, const char quote='\\')
 Return a String with quoted meta-characters from the given string. More...
 

Detailed Description

A class for handling verbatimStrings, derived from string.

A verbatimString is a verbatim string of characters.

Source files

Definition at line 58 of file verbatimString.H.

Constructor & Destructor Documentation

◆ verbatimString() [1/6]

verbatimString ( )
inline

Construct null.

Definition at line 34 of file verbatimStringI.H.

◆ verbatimString() [2/6]

verbatimString ( const verbatimString w)
inline

Copy constructor.

Definition at line 28 of file verbatimStringI.H.

◆ verbatimString() [3/6]

verbatimString ( const char *  s)
inline

Copy constructor of character array.

Definition at line 52 of file verbatimStringI.H.

◆ verbatimString() [4/6]

verbatimString ( const string s)
inline

Copy constructor of string.

Definition at line 40 of file verbatimStringI.H.

◆ verbatimString() [5/6]

verbatimString ( const std::string &  s)
inline

Copy constructor of std::string.

Definition at line 46 of file verbatimStringI.H.

◆ verbatimString() [6/6]

Construct from Istream.

Definition at line 31 of file verbatimStringIO.C.

Member Function Documentation

◆ operator=() [1/4]

void operator= ( const verbatimString q)
inline

Definition at line 60 of file verbatimStringI.H.

References string::operator=().

Here is the call graph for this function:

◆ operator=() [2/4]

void operator= ( const string q)
inline

Definition at line 66 of file verbatimStringI.H.

References string::operator=().

Here is the call graph for this function:

◆ operator=() [3/4]

void operator= ( const std::string &  q)
inline

Definition at line 72 of file verbatimStringI.H.

References string::operator=().

Here is the call graph for this function:

◆ operator=() [4/4]

void operator= ( const char *  q)
inline

Definition at line 78 of file verbatimStringI.H.

References string::operator=().

Here is the call graph for this function:

Friends And Related Function Documentation

◆ operator>>

Istream& operator>> ( Istream ,
verbatimString  
)
friend

◆ operator<<

Ostream& operator<< ( Ostream ,
const verbatimString  
)
friend

Member Data Documentation

◆ typeName

const char *const typeName = "verbatimString"
static

Definition at line 67 of file verbatimString.H.

Referenced by token::verbatimStringToken().

◆ debug

int debug
static

Definition at line 68 of file verbatimString.H.

◆ null

const Foam::verbatimString null
static

An empty verbatimString.

Definition at line 71 of file verbatimString.H.

Referenced by token::verbatimStringToken().


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