rwlogo

Rogue Wave Views
Foundation Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Classes | Functions
string.h File Reference
#include <ilog/macros.h>
#include <ilog/iostream.h>
#include <stddef.h>

Classes

class  IlString
 Class that 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

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*).
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
A reference to the resulting string.
See Also
IlString::catenate(), operator<<(IlString&, const char*).
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
A reference to the resulting string.
See Also
IlString::operator+=(const IlString&), IlString::catenate(), operator+(const IlString&, const IlString&), operator<<(IlString&, const IlString&).
std::ostream& operator<< ( std::ostream &  ostr,
const IlString string 
)

Writes an IlString to an output stream.

Parameters
ostrThe output stream to write to.
stringA reference to the IlString that is written.
Returns
A reference to the given output stream.
See Also
IlString::writeQuoted(), operator>>(std::istream&, IlString&).
std::istream& operator>> ( std::istream &  istr,
IlString string 
)

Reads an IlString from an input stream.

Parameters
istrThe input stream to read from.
stringA reference to the IlString where the stream content is read.
Returns
A reference to the given input stream.
See Also
IlString::readQuoted(std::istream&), operator<<(std::ostream&, const IlString&).

© Copyright 2015, 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.