OLD | NEW |
1 /* | 1 /* |
2 ********************************************************************** | 2 ********************************************************************** |
3 * Copyright (C) 1998-2010, International Business Machines | 3 * Copyright (C) 1998-2010, International Business Machines |
4 * Corporation and others. All Rights Reserved. | 4 * Corporation and others. All Rights Reserved. |
5 ********************************************************************** | 5 ********************************************************************** |
6 * | 6 * |
7 * File unistr.h | 7 * File unistr.h |
8 * | 8 * |
9 * Modification History: | 9 * Modification History: |
10 * | 10 * |
(...skipping 4071 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4082 UnicodeString::extract(int32_t start, | 4082 UnicodeString::extract(int32_t start, |
4083 int32_t _length, | 4083 int32_t _length, |
4084 char *dst, | 4084 char *dst, |
4085 const char *codepage) const | 4085 const char *codepage) const |
4086 | 4086 |
4087 { | 4087 { |
4088 // This dstSize value will be checked explicitly | 4088 // This dstSize value will be checked explicitly |
4089 #if defined(__GNUC__) | 4089 #if defined(__GNUC__) |
4090 // Ticket #7039: Clip length to the maximum valid length to the end of address
able memory given the starting address | 4090 // Ticket #7039: Clip length to the maximum valid length to the end of address
able memory given the starting address |
4091 // This is only an issue when using GCC and certain optimizations are turned o
n. | 4091 // This is only an issue when using GCC and certain optimizations are turned o
n. |
4092 return extract(start, _length, dst, dst!=0 ? ((dst >= (char*)((size_t)-1) - UI
NT32_MAX) ? (((char*)UINT32_MAX) - dst) : UINT32_MAX) : 0, codepage); | 4092 return extract(start, _length, dst, dst!=0 ? ((dst >= (char*)((size_t)-1) - UI
NT32_MAX) ? static_cast<unsigned int>((((char*)UINT32_MAX) - dst)) : UINT32_MAX)
: 0, codepage); |
4093 #else | 4093 #else |
4094 return extract(start, _length, dst, dst!=0 ? 0xffffffff : 0, codepage); | 4094 return extract(start, _length, dst, dst!=0 ? 0xffffffff : 0, codepage); |
4095 #endif | 4095 #endif |
4096 } | 4096 } |
4097 | 4097 |
4098 #endif | 4098 #endif |
4099 | 4099 |
4100 inline void | 4100 inline void |
4101 UnicodeString::extractBetween(int32_t start, | 4101 UnicodeString::extractBetween(int32_t start, |
4102 int32_t limit, | 4102 int32_t limit, |
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4437 { return doReverse(0, length()); } | 4437 { return doReverse(0, length()); } |
4438 | 4438 |
4439 inline UnicodeString& | 4439 inline UnicodeString& |
4440 UnicodeString::reverse(int32_t start, | 4440 UnicodeString::reverse(int32_t start, |
4441 int32_t _length) | 4441 int32_t _length) |
4442 { return doReverse(start, _length); } | 4442 { return doReverse(start, _length); } |
4443 | 4443 |
4444 U_NAMESPACE_END | 4444 U_NAMESPACE_END |
4445 | 4445 |
4446 #endif | 4446 #endif |
OLD | NEW |