version 1.93, 2005/11/27 03:11:36
|
version 1.94, 2005/12/01 18:35:07
|
|
|
@return Length of the String in characters. For example, | @return Length of the String in characters. For example, |
<pre> | <pre> |
String s = "abcd"; | String s = "abcd"; |
PEGASUS_ASSERT(s.size() == 4); |
assert(s.size() == 4); |
</pre> | </pre> |
returns a value of 4 for the length. | returns a value of 4 for the length. |
*/ | */ |
|
|
<pre> | <pre> |
String test = "abc"; | String test = "abc"; |
test.append(Char16('d')); | test.append(Char16('d')); |
PEGASUS_ASSERT(test == "abcd"); |
assert(test == "abcd"); |
</pre> | </pre> |
@exception bad_alloc Thrown if there is insufficient memory. | @exception bad_alloc Thrown if there is insufficient memory. |
*/ | */ |
|
|
<pre> | <pre> |
String test = "abc"; | String test = "abc"; |
test.append("def"); | test.append("def"); |
PEGASUS_ASSERT(test == "abcdef"); |
assert(test == "abcdef"); |
</pre> | </pre> |
@exception bad_alloc Thrown if there is insufficient memory. | @exception bad_alloc Thrown if there is insufficient memory. |
*/ | */ |
|
|
String s; | String s; |
s = "abc"; | s = "abc"; |
s.remove(0, 1); | s.remove(0, 1); |
PEGASUS_ASSERT(String::equal(s, "bc")); |
assert(String::equal(s, "bc")); |
PEGASUS_ASSERT(s.size() == 2); |
assert(s.size() == 2); |
s.remove(0); | s.remove(0); |
PEGASUS_ASSERT(String::equal(s, "")); |
assert(String::equal(s, "")); |
PEGASUS_ASSERT(s.size() == 0); |
assert(s.size() == 0); |
</pre> | </pre> |
@exception IndexOutOfBoundsException If size is greater than | @exception IndexOutOfBoundsException If size is greater than |
length of String plus starting index for remove. | length of String plus starting index for remove. |
|
|
String s1 = "Hello World"; | String s1 = "Hello World"; |
String s2 = s1; | String s2 = s1; |
String s3(s2); | String s3(s2); |
PEGASUS_ASSERT(String::equal(s1, s3)); |
assert(String::equal(s1, s3)); |
</pre> | </pre> |
*/ | */ |
static Boolean equal(const String& str1, const String& str2); | static Boolean equal(const String& str1, const String& str2); |
|
|
String t1 = "abc"; | String t1 = "abc"; |
String t2; | String t2; |
t2 = t1 + "def" | t2 = t1 + "def" |
PEGASUS_ASSERT(t2 == "abcdef"); |
assert(t2 == "abcdef"); |
</pre> | </pre> |
*/ | */ |
PEGASUS_COMMON_LINKAGE String operator+(const String& str1, const String& str2); | PEGASUS_COMMON_LINKAGE String operator+(const String& str1, const String& str2); |
|
|
<pre> | <pre> |
String t1 = "def"; | String t1 = "def"; |
String t2 = "a"; | String t2 = "a"; |
PEGASUS_ASSERT (t2 < t1); |
assert (t2 < t1); |
</pre> | </pre> |
@param str1 REVIEWERS: Insert description here. | @param str1 REVIEWERS: Insert description here. |
@param str2 REVIEWERS: Insert description here. | @param str2 REVIEWERS: Insert description here. |