Views
Foundation Package API Reference Guide
Product Documentation:
Views Documentation Home
string.h File Reference
#include <string>
#include <ilog/macros.h>
#include <ilog/iostream.h>
#include <stddef.h>

Classes

class   IlString
  Manages strings in single or multi-bytes. More...
 

Functions

IlBoolean ILOG_EXPORTED  operator!= (const char *strLeft, const IlString &strRight)
  Not equal operator. More...
 
IlBoolean ILOG_EXPORTED  operator!= (const IlString &strLeft, const char *strRight)
  Not equal operator. More...
 
IlString ILOG_EXPORTED  operator+ (const char *strLeft, const IlString &strRight)
  Concatenation operator. More...
 
IlString  operator+ (const IlString &string1, const IlString &string2)
  Concatenation operator. More...
 
IlString ILOG_EXPORTED  operator+ (const IlString &strLeft, const char *strRight)
  Concatenation operator. More...
 
IlString operator<< (IlString &string, const char *cstring)
  Append operator. More...
 
IlString operator<< (IlString &string1, const IlString &string2)
  Append operator. More...
 
std::ostream &  operator<< (std::ostream &ostr, const IlString &string)
  Writes an IlString to an output stream. More...
 
IlBoolean ILOG_EXPORTED  operator== (const char *strLeft, const IlString &strRight)
  Equality operator. More...
 
IlBoolean ILOG_EXPORTED  operator== (const IlString &strLeft, const char *strRight)
  Equality operator. More...
 
std::istream &  operator>> (std::istream &istr, IlString &string)
  Reads an IlString from an input stream. More...
 

Detailed Description

Library: ilog
Declaration of the IlString class and some utilities.

Function Documentation

◆ operator!=() [1/2]

IlBoolean ILOG_EXPORTED operator!= ( const char *  strLeft,
const IlString strRight 
)

Not equal operator.

Parameters
strLeft The left char*.
strRight The right IlString.
Returns
IlTrue when the strings are not equal and IlFalse otherwise.

◆ operator!=() [2/2]

IlBoolean ILOG_EXPORTED operator!= ( const IlString strLeft,
const char *  strRight 
)

Not equal operator.

Parameters
strLeft The left IlString.
strRight The right char*.
Returns
IlTrue when the strings are not equal and IlFalse otherwise.

◆ operator+() [1/3]

IlString ILOG_EXPORTED operator+ ( const char *  strLeft,
const IlString strRight 
)

Concatenation operator.

Parameters
strLeft The left char*.
strRight The right IlString.
Returns
The resulting IlString.

◆ operator+() [2/3]

IlString operator+ ( const IlString string1,
const IlString string2 
)

Concatenation operator.

This operator concatenates two IlString objects into a new one.

Example:

Parameters
string1 The head IlString.
string2 The tail IlString.
Returns
The resulting string.
See also
IlString::operator+=(), IlString::catenate(), operator<<(IlString&, const IlString&), operator<<(IlString&, const char*).

◆ operator+() [3/3]

IlString ILOG_EXPORTED operator+ ( const IlString strLeft,
const char *  strRight 
)

Concatenation operator.

Parameters
strLeft The left IlString.
strRight The right char*.
Returns
The resulting IlString.

◆ operator<<() [1/3]

IlString& operator<< ( IlString string,
const char *  cstring 
)

Append operator.

This operator appends a C-style string to an IlString.

Example:

Parameters
string The source IlString where cstring is appended.
cstring A null-terminated C-style string.
Returns
The resulting string.
See also
IlString::operator+=(const IlString&), IlString::catenate(), operator+(const IlString&, const IlString&), operator<<(IlString&, const IlString&).

◆ operator<<() [2/3]

IlString& operator<< ( IlString string1,
const IlString string2 
)

Append operator.

This operator appends an IlString to another IlString.

Example:

Parameters
string1 The source IlString where string2 is appended.
string2 The string that is appended to string1.
Returns
The resulting string.
See also
IlString::catenate(), operator<<(IlString&, const char*).

◆ operator<<() [3/3]

std::ostream& operator<< ( std::ostream &  ostr,
const IlString string 
)

Writes an IlString to an output stream.

Parameters
ostr The output stream to write to.
string The string that is written.
Returns
The given output stream, ostr.
See also
IlString::writeQuoted(), operator>>(std::istream&, IlString&).

◆ operator==() [1/2]

IlBoolean ILOG_EXPORTED operator== ( const char *  strLeft,
const IlString strRight 
)

Equality operator.

Parameters
strLeft The left char*.
strRight The right IlString.
Returns
IlTrue when the strings are equal and IlFalse otherwise.

◆ operator==() [2/2]

IlBoolean ILOG_EXPORTED operator== ( const IlString strLeft,
const char *  strRight 
)

Equality operator.

Parameters
strLeft The left IlString.
strRight The right char*.
Returns
IlTrue when the strings are equal and IlFalse otherwise.

◆ operator>>()

std::istream& operator>> ( std::istream &  istr,
IlString string 
)

Reads an IlString from an input stream.

Parameters
istr The input stream to read from.
string The string where the stream content is read.
Returns
The given input stream, istr.
See also
IlString::readQuoted(std::istream&), operator<<(std::ostream&, const IlString&).