String Class Reference

#include <String.h>

List of all members.


Detailed Description

SimTK::String is just an std::string with some additional methods defined.

It may be freely interspersed with std:strings.

Binary compatibility note: while the std::string implementation, like the other std classes, is fully exposed in its header file, we have determined that these classes are stable enough, and that compiler implementators work hard to maintain cross-release stability, that we will assume they are "sufficiently" binary compatible to use them in the SimTK API. So std::string and SimTK::String can be passed through the API interface, and will be binary compatible from release to release of the SimTK Core, provided that the compilers used to compile client and library code are binary compatible with respect to the std::string implementation in the C++ Standard Template Library.


Public Member Functions

 String ()
 default constructor produces an empty string
 String (const char *s)
 This is an implicit conversion from const char* to String.
 String (const std::string &s)
 This is an implicit conversion from std::string to String.
 String (const String &s, int start, int len)
 Construct a String as a copy of a substring begining at position start with length len.
 operator const char * () const
 This is an implicit conversion from String to null-terminated C-style string (array of chars).
char & operator[] (int i)
 Add operator[] that takes int index instead of size_type.
char operator[] (int i) const
 Add operator[] that takes int index instead of size_type.
char & operator[] (std::string::size_type i)
 Pass through to string::operator[].
char operator[] (std::string::size_type i) const
 Pass through to string::operator[].
Formatting constructors
These contructors format the supplied argument into a String.

 String (int i)
 String (long i)
 String (unsigned int s)
 String (unsigned long s)
 String (float r)
 String (double r)
 String (long double r)
 String (std::complex< float > r)
 String (std::complex< double > r)
 String (std::complex< long double > r)
 String (bool b)


Constructor & Destructor Documentation

String (  )  [inline]

default constructor produces an empty string

String ( const char *  s  )  [inline]

This is an implicit conversion from const char* to String.

String ( const std::string &  s  )  [inline]

This is an implicit conversion from std::string to String.

String ( const String s,
int  start,
int  len 
) [inline]

Construct a String as a copy of a substring begining at position start with length len.

String ( int  i  )  [inline, explicit]

String ( long  i  )  [inline, explicit]

String ( unsigned int  s  )  [inline, explicit]

String ( unsigned long  s  )  [inline, explicit]

String ( float  r  )  [inline, explicit]

String ( double  r  )  [inline, explicit]

String ( long double  r  )  [inline, explicit]

String ( std::complex< float >  r  )  [inline, explicit]

String ( std::complex< double >  r  )  [inline, explicit]

String ( std::complex< long double >  r  )  [inline, explicit]

String ( bool  b  )  [inline, explicit]


Member Function Documentation

operator const char * (  )  const [inline]

This is an implicit conversion from String to null-terminated C-style string (array of chars).

char operator[] ( std::string::size_type  i  )  const [inline]

Pass through to string::operator[].

char& operator[] ( std::string::size_type  i  )  [inline]

Pass through to string::operator[].

char operator[] ( int  i  )  const [inline]

Add operator[] that takes int index instead of size_type.

char& operator[] ( int  i  )  [inline]

Add operator[] that takes int index instead of size_type.


The documentation for this class was generated from the following file:
Generated on Thu Feb 28 01:34:36 2008 for SimTKcommon by  doxygen 1.4.7