version 1.39, 2001/07/16 01:35:16
|
version 1.39.2.2, 2001/08/02 02:15:49
|
|
|
*/ | */ |
Uint32 size() const { return _rep.size() - 1; } | Uint32 size() const { return _rep.size() - 1; } |
| |
/** Returns a pointer to the first character in the null-terminated string |
/** getData Returns a pointer to the first character in the |
string. |
null-terminated string string of the String object. |
@return Pointer to the first character of the String object | @return Pointer to the first character of the String object |
<pre> | <pre> |
String t1 = "abc"; | String t1 = "abc"; |
|
|
*/ | */ |
const Char16* getData() const { return _rep.getData(); } | const Char16* getData() const { return _rep.getData(); } |
| |
/** AallocateCString - llocates an 8 bit representation of this string. The |
/** AallocateCString - llocates an 8 bit representation of this String |
user is |
object. The user is responsible for freeing the result. If any |
responsible for freeing the result. If any characters are truncated, |
characters are truncated, a TruncatedCharacter exception is thrown. |
a TruncatedCharacter exception is thrown. This exception may |
This exception may be suppressed by passing true as the noThrow |
be suppressed by passing true as the noThrow argument. Extra |
argument. Extra characters may be allocated at the end of the |
characters may be allocated at the end of the new string by |
new string by passing a non-zero value to the extraBytes argument. |
passing a non-zero value to the extraBytes argument. |
|
@param extraBytes Defines the number of extra characters to be | @param extraBytes Defines the number of extra characters to be |
allocated at the end of the new string. Default is zero. | allocated at the end of the new string. Default is zero. |
|
|
@param noThrow If true, no exception will be thrown if characters | @param noThrow If true, no exception will be thrown if characters |
are truncated | are truncated |
|
|
@return pointer to the new representation of the string | @return pointer to the new representation of the string |
|
|
@exception Throws TruncatedCharacter exception if any characters are | @exception Throws TruncatedCharacter exception if any characters are |
truncated | truncated |
<pre> | <pre> |
|
|
*/ | */ |
char* allocateCString(Uint32 extraBytes = 0, Boolean noThrow = false) const; | char* allocateCString(Uint32 extraBytes = 0, Boolean noThrow = false) const; |
| |
/** appendToCString - Append the given string to a C-string. If the length |
/** appendToCString - Append the given String object to a C-string. If the |
is not PEG_NOT_FOUND, then the lesser of the the length argument and the |
length is not PEG_NOT_FOUND, then the lesser of the the length argument |
length of this string is truncated. Otherwise, the entire string is |
and he length of this string is truncated. Otherwise, the entire string |
trunctated. The TruncatedCharacter exception is thrown if any characters |
is trunctated. The TruncatedCharacter exception is thrown if any |
are truncated. |
characters are truncated. |
@param str Char pointer to the string to append | @param str Char pointer to the string to append |
@param length Length to append or PEG_NOT_FOUND (Uint32(-1) | @param length Length to append or PEG_NOT_FOUND (Uint32(-1) |
@param noThrow - If false, throw the "TruncatedCharacter" exception of | @param noThrow - If false, throw the "TruncatedCharacter" exception of |
|
|
*/ | */ |
static int compareNoCase(const char* s1, const char* s2, Uint32 n); | static int compareNoCase(const char* s1, const char* s2, Uint32 n); |
| |
|
static int compareNoCase(const char* s1, const char* s2); |
|
|
/** Compare two null-terminated strings. | /** Compare two null-terminated strings. |
@param s1 First null-terminated string for the comparison. | @param s1 First null-terminated string for the comparison. |
@param s2 Second null-terminated string for the comparison. | @param s2 Second null-terminated string for the comparison. |