Public Methods | |
oaString () | |
oaString (oaUInt4 length) | |
oaString (const oaChar *initialValue) | |
oaString (const oaChar *initialValue, oaUInt4 length) | |
oaString (const oaString &s) | |
~oaString () | |
oaString & | operator= (oaChar c) |
oaString & | operator= (const oaChar *str) |
oaString & | operator= (const oaString &str) |
oaString & | operator+= (oaChar c) |
oaString & | operator+= (const oaChar *str) |
oaString & | operator+= (const oaString &str) |
oaBoolean | operator< (const oaString &str) const |
oaBoolean | operator> (const oaString &str) const |
oaBoolean | operator== (const oaString &str) const |
oaBoolean | operator<= (const oaString &str) const |
oaBoolean | operator>= (const oaString &str) const |
oaBoolean | operator!= (const oaString &str) const |
operator const oaChar * () const | |
oaUInt4 | getLength () const |
oaBoolean | isEmpty () const |
oaDouble | toDouble () const |
int | toInt () const |
void | toUpper () |
void | toLower () |
void | resize (oaUInt4 size) |
oaUInt4 | getSize () const |
char & | operator[] (oaUInt4 i) |
const oaChar & | operator[] (oaUInt4 i) const |
oaUInt4 | index (oaChar c, oaUInt4 offset=0) const |
oaUInt4 | substr (const oaString &sub, oaUInt4 offset=0) const |
oaBoolean | isEqual (const oaString &str, oaBoolean ignoreCase) const |
void | format (oaUInt4 size, const oaChar *formatStr,...) |
void | format (const oaChar *formatStr,...) |
void | format (const oaChar *formatStr, va_list args) |
Friends | |
OA_BASE_DLL_API oaString | operator+ (const oaString &s1, const oaString &s2) |
OA_BASE_DLL_API oaBoolean | operator< (const oaString &s1, const oaChar *s2) |
OA_BASE_DLL_API oaBoolean | operator< (const oaChar *s1, const oaString &s2) |
OA_BASE_DLL_API oaBoolean | operator> (const oaString &s1, const oaChar *s2) |
OA_BASE_DLL_API oaBoolean | operator> (const oaChar *s1, const oaString &s2) |
OA_BASE_DLL_API oaBoolean | operator== (const oaString &s1, const oaChar *s2) |
OA_BASE_DLL_API oaBoolean | operator== (const oaChar *s1, const oaString &s2) |
OA_BASE_DLL_API oaBoolean | operator<= (const oaString &s1, const oaChar *s2) |
OA_BASE_DLL_API oaBoolean | operator<= (const oaChar *s1, const oaString &s2) |
OA_BASE_DLL_API oaBoolean | operator>= (const oaString &s1, const oaChar *s2) |
OA_BASE_DLL_API oaBoolean | operator>= (const oaChar *s1, const oaString &s2) |
OA_BASE_DLL_API oaBoolean | operator!= (const oaString &s1, const oaChar *s2) |
OA_BASE_DLL_API oaBoolean | operator!= (const oaChar *s1, const oaString &s2) |
An oaString supports many common operations one may need to do on a string:
|
This function constructs an empty oaString object, containing only the NULL character. |
|
This function creates an empty oaString of the specified length. The empty oaString contains only the NULL character.
|
|
This function constructs an oaString object by copying the string specified in initialValue. It is assumed that initialValue is pointing at a NULL terminated string. The oaString is sized accordingly to fit the initialvalue. If initialValue is NULL, an empty oaString object is constructed.
|
|
This function constructs an oaString instance by copying the string specified in initialValue up to length characters. A terminating NULL character is placed at the length character. If initialValue is NULL, an empty oaString object is constructed.
|
|
This function constructs a copy of the specified oaString. |
|
This function destroys this oaString object, freeing the memory associated with the it. |
|
This function formats this string according to the format specification given in formatStr. The format specification has the same form as the format argument for printf. Note: If the number of va_list args is 1 and the type of the argument is char *, compilers may call the wrong function, which can result in incorrect behavior or a crash. To avoid problems, the argument should be cast to (const char*). |
|
This function formats this string according to the format specification given in formatStr. The format specification has the same form as the format argument for printf. Note: If the number of variable arguments to this function is 1 and the type of the argument is char *, compilers may call the wrong function, which can result in incorrect behavior or a crash. To avoid problems, the argument should be cast to (const char*), for example,
|
|
This function increases the size of this string to the specified size and formats it according to the format specification given in formatStr. The format specification has the same form as the format argument for printf. If the length of the formatted string is larger than the specified size, this function will not resize this string to fit the formatted string. This function should only be used when the size is known to be bounded. |
|
This function returns the length of this string. The value represents the number of characters in this string excluding the trailing NULL character. |
|
This function returns the size of the space allocated for this oaString. |
|
This function searches this string and returns an index to the first occurrence of the specified character. If the character is not found, the index to the terminating NULL character is returned. You can specify an optional initial offset into the string from where the search will begin.
|
|
This function returns a boolean that indicates whether this string is empty or not. |
|
This function compares this oaString with the oaString str, either with or without case sensitivity, and returns true if they are equal.
|
|
This function implements an operator that returns a const oaChar* pointer to the contents of this string. |
|
This logical operator compares this oaString with the specified oaString str and returns true if their values are not alphanumerically equal. |
|
This assignment operator for the oaString class concatenates the specified string str with this oaString. This oaString is resized accordingly to fit the new set of characters. |
|
This assignment operator for the oaString class concatenates the specified const character string str to this oaString. This oaString is resized accordingly to fit the new set of characters. It is assumed that the given str is NULL terminated. |
|
This assignment operator for the oaString class concatenates the specified character c to this oaString. This oaString is resized accordingly to fit the character. |
|
This logical operator compares this oaString with the specified oaString str and returns true if this oaString is alphanumerically less than str. |
|
This logical operator compares this oaString with the specified oaString str and returns true if this oaString is alphanumerically less than or equal to str. |
|
This assignment operator for the oaString class copies the specified oaString str into this oaString. The contents of this oaString are overwritten. |
|
This assignment operator for the oaString class copies the specified const char* string str into this oaString. The contents of this oaString are overwritten. This oaString will be resized accordingly in order to accommodate the given str value. |
|
This assignment operator for the oaString class copies the specified character c into this oaString. The contents of this oaString are overwritten. |
|
This logical operator compares this oaString with the specified oaString str and returns true if this oaString is alphanumerically equal to str. |
|
This logical operator compares this oaString with the specified oaString str and returns true if this oaString is alphanumerically greater than str. |
|
This logical operator compares this oaString with the specified oaString str and returns true if this oaString is alphanumerically greater than or equal to str. |
|
This index operator for the oaString class returns the character at position i in the string. This const version does not allow you to modify the character.
|
|
This index operator for the oaString class returns the character at position i in the string. This non-const version allows you to modify the character.
|
|
This function increases the amount of space allocated by this string to newSize. The contents of the string is retained. |
|
This function searches this oaString and returns the index to the first occurrence of the specified substring sub. If the substring is not found, index of the terminating NULL character is returned. You can specify an optional initial offset into the string from which the search will begin.
|
|
This function converts the contents of this oaString to a double value and returns it. See the system function
|
|
This function converts the contents of this oaString to an integer value and returns it. See the system function
|
|
This function changes the contents of this oaString so that all of the alphabetic characters are in lowercase. |
|
This function converts the contents of this oaString so that all of the alphabetic characters are in uppercase. |
|
This logical operator compares an oaChar s1 against an oaString s2 and returns true if their values are not alphanumerically equal. |
|
This logical operator compares an oaString s1 against an oaChar s2 and returns true if their values are not alphanumerically equal. |
|
|
|
This logical operator compares an oaChar s1 against an oaString s2 and returns true if s1 is alphanumerically less than s2. |
|
This logical operator compares an oaString s1 against an oaChar s2 and returns true if s1 is alphanumerically less than s2. |
|
This logical operator compares an oaChar s1 against an oaString s2 and returns true if s1 is alphanumerically less than or equal to s2. |
|
|
|
This logical operator compares an oaChar s1 against an oaString s2 and returns true if s1 is alphanumerically equal to s2. |
|
This logical operator compares an oaString s1 against an oaChar s2 and returns true if s1 is alphanumerically equal to s2. |
|
This logical operator compares an oaChar s1 against an oaString s2 and returns true if s1 is alphanumerically greater than s2. |
|
|
|
This logical operator compares an oaChar s1 against an oaString s2 and returns true if s1 is alphanumerically greater than or equal to s2. |
|
|
Copyright © 2002 - 2010 Cadence Design Systems, Inc.
All Rights Reserved.