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

template<typename Iterator >
void append (Iterator first, Iterator last)
void append (const char *s, std::size_t length)
void append (const std::string &s)
void append (const string_t &s)
void append (const char *s)
const_iterator begin () const
const char * c_str () const
size_type capacity () const
void clear ()
bool empty () const
const_iterator end () const
 operator bool () const
 operator std::string () const
string_toperator+= (const string_t &s)
string_toperator+= (const char *s)
string_toperator+= (const std::string &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)
 string_t (const char *s, std::size_t length)
 string_t ()
template<typename Iterator >
 string_t (Iterator first, Iterator last)
 string_t (const string_t &s)
 string_t (const char *s)
 string_t (move_from< string_t > x)
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 256 of file string.hpp.

string_t ( const string_t s )

Copy constructor.

Definition at line 261 of file string.hpp.

Move constructor.

Definition at line 266 of file string.hpp.

string_t ( const char *  s )

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

Parameters:
[in]snull-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]scharacter sequence from which to construct the string_t
[in]lengthnumber 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]firststart of sequence from which to construct the string_t
[in]lastend of sequence from which to construct the string_t

Definition at line 290 of file string.hpp.

string_t ( const std::string &  s )

Constructs a string_t from a std::string.

Parameters:
[in]sstd::string from which to construct the string_t
~string_t (  )

Destructor.

Definition at line 303 of file string.hpp.


Member Function Documentation

void append ( Iterator  first,
Iterator  last 
)

Appends a character sequence to the end of the string

Definition at line 339 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 366 of file string.hpp.

void append ( const std::string &  s )

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

Definition at line 372 of file string.hpp.

void append ( const string_t s )

Appends another string this one

Definition at line 354 of file string.hpp.

void append ( const char *  s )

Appends null-terminated char sequence to the string

Definition at line 360 of file string.hpp.

const_iterator begin (  ) const

Returns an iterator to the first element of the string.

Definition at line 396 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 327 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 433 of file string.hpp.

bool empty (  ) const

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

Definition at line 445 of file string.hpp.

const_iterator end (  ) const

Returns an iterator just past the end of the string.

Definition at line 402 of file string.hpp.

operator bool (  ) const

Returns true if the string is not empty, false otherwise.

Definition at line 451 of file string.hpp.

operator std::string (  ) const

Conversion operator to std::string.

Definition at line 320 of file string.hpp.

string_t& operator+= ( const char *  s )

Appends null-terminated char sequence to the string

Definition at line 384 of file string.hpp.

string_t& operator+= ( const string_t s )

Appends another string this one

Definition at line 378 of file string.hpp.

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

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

Definition at line 390 of file string.hpp.

string_t& operator= ( string_t  s )

Assignment operator.

Definition at line 309 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 408 of file string.hpp.

const_reverse_iterator rend (  ) const

Returns a reverse_iterator to the beginning of the current string.

Definition at line 414 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 427 of file string.hpp.

size_type size (  ) const

Returns the number of elements in the current string.

Definition at line 439 of file string.hpp.

void swap ( string_t s )

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

Definition at line 456 of file string.hpp.


Friends And Related Function Documentation

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

Definition at line 464 of file string.hpp.

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

Definition at line 459 of file string.hpp.

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

Definition at line 469 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