Rogue Wave Views
Foundation Package API Reference Guide
Product Documentation:

Rogue Wave Views
Documentation Home
Classes | Functions
string.h File Reference
#include <ilog/macros.h>
#include <ilog/iostream.h>
#include <stddef.h>

Classes

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

Functions

IlString operator+ (const IlString &string1, const IlString &string2)
 Concatenation operator. More...
 
IlStringoperator<< (IlString &string1, const IlString &string2)
 Append operator. More...
 
IlStringoperator<< (IlString &string, const char *cstring)
 Append operator. More...
 
std::ostream & operator<< (std::ostream &ostr, const IlString &string)
 Writes an IlString to an output stream. 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+()

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

Concatenation operator.

This operator concatenates two IlString objects into a new one.

Example:

IlString string1("Lorem");
IlString string2(" ipsum");
IlString string3(string1 + string2);
// string3 is now "Lorem ipsum"
Parameters
string1The head IlString.
string2The tail IlString.
Returns
The resulting string.
See also
IlString::operator+=(), IlString::catenate(), operator<<(IlString&, const IlString&), operator<<(IlString&, const char*).

§ operator<<() [1/3]

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

Append operator.

This operator appends an IlString to another IlString.

Example:

IlString string1("Lorem");
IlString string2(" ipsum");
string1 << string2;
// string1 is now "Lorem ipsum"
Parameters
string1The source IlString where string2 is appended.
string2The string that is appended to string1.
Returns
The resulting string.
See also
IlString::catenate(), operator<<(IlString&, const char*).

§ operator<<() [2/3]

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

Append operator.

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

Example:

IlString string("Lorem");
string << " ipsum";
// string is now "Lorem ipsum"
Parameters
stringThe source IlString where cstring is appended.
cstringA 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<<() [3/3]

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

Writes an IlString to an output stream.

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

§ operator>>()

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

Reads an IlString from an input stream.

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

© Copyright 2017, Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave is a registered trademark of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.