stlab.adobe.com Adobe Systems Incorporated

string_t Class Reference

#include <string.hpp>

List of all members.


Public Types

typedef const char * const_iterator
typedef const char * const_pointer
typedef const char & const_reference
typedef std::reverse_iterator
< const char * > 
const_reverse_iterator
typedef std::ptrdiff_t difference_type
typedef char * iterator
typedef char * pointer
typedef char & reference
typedef std::reverse_iterator
< char * > 
reverse_iterator
typedef std::size_t size_type
typedef char value_type

Public Member Functions

void append (const std::string &s)
void append (const char *s, std::size_t length)
void append (const char *s)
void append (const string_t &s)
template<typename Iterator >
void append (Iterator first, Iterator last)
const_iterator begin () const
const char * c_str () const
size_type capacity () const
void clear ()
bool empty () const
const_iterator end () const
 operator std::string () const
string_toperator+= (const std::string &s)
string_toperator+= (const char *s)
string_toperator+= (const string_t &s)
string_toperator= (string_t s)
void push_back (value_type c)
const_reverse_iterator rbegin () const
const_reverse_iterator rend () const
void reserve (size_type n)
size_type size () const
 string_t (const std::string &s)
template<typename Iterator >
 string_t (Iterator first, Iterator last)
 string_t (const char *s, std::size_t length)
 string_t (const char *s)
 string_t (move_from< string_t > x)
 string_t (const string_t &s)
 string_t ()
void swap (string_t &s)
 ~string_t ()

Friends

bool operator< (const string_t &x, const string_t &y)
bool operator== (const string_t &x, const string_t &y)
void swap (string_t &x, string_t &y)

Detailed Description

Definition at line 192 of file string.hpp.


Member Typedef Documentation

typedef const char* const_iterator

Definition at line 203 of file string.hpp.

typedef const char* const_pointer

Definition at line 197 of file string.hpp.

typedef const char& const_reference

Definition at line 199 of file string.hpp.

typedef std::reverse_iterator<const char*> const_reverse_iterator

Definition at line 205 of file string.hpp.

typedef std::ptrdiff_t difference_type

Definition at line 201 of file string.hpp.

typedef char* iterator

Definition at line 202 of file string.hpp.

typedef char* pointer

Definition at line 196 of file string.hpp.

typedef char& reference

Definition at line 198 of file string.hpp.

typedef std::reverse_iterator<char*> reverse_iterator

Definition at line 204 of file string.hpp.

typedef std::size_t size_type

Definition at line 200 of file string.hpp.

typedef char value_type

Definition at line 195 of file string.hpp.


Constructor & Destructor Documentation

string_t (  ) 

Constructs an empty string.

Definition at line 254 of file string.hpp.

string_t ( const string_t s  ) 

Copy constructor.

Definition at line 259 of file string.hpp.

string_t ( move_from< string_t x  ) 

Move constructor.

Definition at line 264 of file string.hpp.

string_t ( const char *  s  ) 

Constructs a string_t from a regular C string (including string literals).

Parameters:
[in] s null-terminated string from which to construct the string_t

string_t ( const char *  s,
std::size_t  length 
)

Constructs a string from a char sequence.

Parameters:
[in] s character sequence from which to construct the string_t
[in] length number of elements from s from which to construct the string_t

string_t ( Iterator  first,
Iterator  last 
)

Constructs a string_t from a generic sequence.

Parameters:
[in] first start of sequence from which to construct the string_t
[in] last end of sequence from which to construct the string_t

Definition at line 288 of file string.hpp.

string_t ( const std::string &  s  ) 

Constructs a string_t from a std::string.

Parameters:
[in] s std::string from which to construct the string_t

~string_t (  ) 

Destructor.

Definition at line 301 of file string.hpp.


Member Function Documentation

void append ( const std::string &  s  ) 

Appends the contents of a std::string to the string

Definition at line 370 of file string.hpp.

void append ( const char *  s,
std::size_t  length 
)

Appends a number of characters from a sequence to the string

Definition at line 364 of file string.hpp.

void append ( const char *  s  ) 

Appends null-terminated char sequence to the string

Definition at line 358 of file string.hpp.

void append ( const string_t s  ) 

Appends another string this one

Definition at line 352 of file string.hpp.

void append ( Iterator  first,
Iterator  last 
)

Appends a character sequence to the end of the string

Definition at line 337 of file string.hpp.

const_iterator begin (  )  const

Returns an iterator to the first element of the string.

Definition at line 394 of file string.hpp.

const char* c_str (  )  const

Returns const pointer to a regular C string, identical to the string_t. The returned string is null-terminated.

Definition at line 325 of file string.hpp.

size_type capacity (  )  const

Returns the size of the allocated storage space for the elements of the string.

void clear (  ) 

Changes the string to be zero-length.

Definition at line 431 of file string.hpp.

bool empty (  )  const

Returns true if the string has no elements, false otherwise.

Definition at line 443 of file string.hpp.

const_iterator end (  )  const

Returns an iterator just past the end of the string.

Definition at line 400 of file string.hpp.

operator std::string (  )  const

Conversion operator to std::string.

Definition at line 318 of file string.hpp.

string_t& operator+= ( const std::string &  s  ) 

Appends the contents of a std::string to the string

Definition at line 388 of file string.hpp.

string_t& operator+= ( const char *  s  ) 

Appends null-terminated char sequence to the string

Definition at line 382 of file string.hpp.

string_t& operator+= ( const string_t s  ) 

Appends another string this one

Definition at line 376 of file string.hpp.

string_t& operator= ( string_t  s  ) 

Assignment operator.

Definition at line 307 of file string.hpp.

void push_back ( value_type  c  ) 

Appends one element to the end of the string.

const_reverse_iterator rbegin (  )  const

Returns a reverse_iterator to the end of the current string.

Definition at line 406 of file string.hpp.

const_reverse_iterator rend (  )  const

Returns a reverse_iterator to the beginning of the current string.

Definition at line 412 of file string.hpp.

void reserve ( size_type  n  ) 

Requests that the capacity of the allocated storage space for the elements of the string be at least enough to hold n elements.

Definition at line 425 of file string.hpp.

size_type size (  )  const

Returns the number of elements in the current string.

Definition at line 437 of file string.hpp.

void swap ( string_t s  ) 

Exchanges the elements of the current string with those of from s.

Definition at line 449 of file string.hpp.


Friends And Related Function Documentation

bool operator< ( const string_t x,
const string_t y 
) [friend]

Definition at line 457 of file string.hpp.

bool operator== ( const string_t x,
const string_t y 
) [friend]

Definition at line 452 of file string.hpp.

void swap ( string_t x,
string_t y 
) [friend]

Definition at line 462 of file string.hpp.

Copyright © 2006-2007 Adobe Systems Incorporated.

Use of this website signifies your agreement to the Terms of Use and Online Privacy Policy.

Search powered by Google