version 1.111.2.4, 2005/09/29 02:22:39
|
version 1.111.2.5, 2005/09/29 13:40:32
|
|
|
| |
Uint32 StringRep::length(const Uint16* str) | Uint32 StringRep::length(const Uint16* str) |
{ | { |
// ATTN: We could unroll this but it is infrequently called. |
// Note: We could unroll this but it is rarely called. |
| |
const Uint16* end = (Uint16*)str; | const Uint16* end = (Uint16*)str; |
| |
|
|
| |
String String::subString(Uint32 index, Uint32 n) const | String String::subString(Uint32 index, Uint32 n) const |
{ | { |
// ATTN: this implementation is very permissive but used for |
// Note: this implementation is very permissive but used for |
// backwards compatibility. | // backwards compatibility. |
| |
if (index < _rep->size) | if (index < _rep->size) |
|
|
{ | { |
_check_null_pointer(s); | _check_null_pointer(s); |
| |
// ATTN: implement faster version of this that doesn't create a string |
// Note: could optimize away creation of temporary, but this is rarely |
// object. |
// called. |
return find(String(s)); | return find(String(s)); |
} | } |
| |
|
|
#else /* PEGASUS_STRING_ENABLE_ICU */ | #else /* PEGASUS_STRING_ENABLE_ICU */ |
| |
// ATTN: optimize this! | // ATTN: optimize this! |
|
|
return String::equalNoCase(s1, String(s2)); | return String::equalNoCase(s1, String(s2)); |
| |
#endif /* PEGASUS_STRING_ENABLE_ICU */ | #endif /* PEGASUS_STRING_ENABLE_ICU */ |
|
|
| |
#else /* PEGASUS_STRING_NO_UTF8 */ | #else /* PEGASUS_STRING_NO_UTF8 */ |
| |
// ATTN: optimize this! |
|
return String::equal(s1, String(s2)); | return String::equal(s1, String(s2)); |
| |
#endif /* PEGASUS_STRING_NO_UTF8 */ | #endif /* PEGASUS_STRING_NO_UTF8 */ |