Commit Graph

185 Commits

Author SHA1 Message Date
Markus Scherer
7960164327 ICU-12663 UnicodeString support nearly 2G UChars & avoid integer overflows; string-to-string case mappings & detect integer overflows; make some calls to uprv_memcpy() and similar a little more robust by casting int32_t to size_t before multiplying
X-SVN-Rev: 39288
2016-09-20 01:10:36 +00:00
Fredrik Roubert
3959b30d02 ICU-12140 Pass StringPiece by value, externally.
R=markus.icu@gmail.com

Review URL: https://codereview.appspot.com/306850043 .

X-SVN-Rev: 39064
2016-08-17 19:07:15 +00:00
Fredrik Roubert
de579d3bf9 ICU-12140 Pass StringPiece by value, internally.
R=markus.icu@gmail.com

Review URL: https://codereview.appspot.com/305000043 .

X-SVN-Rev: 39024
2016-08-04 17:40:53 +00:00
Michael Ow
61607c2773 ICU-12564 Update copyright notice in trunk
X-SVN-Rev: 38848
2016-06-15 18:58:17 +00:00
Yoshito Umaoka
00ca13e126 ICU-12564 Reverted r38761 and r38762, because we want to prepend the Unicode copyright for existing source files, instead of replacing copyright comments.
X-SVN-Rev: 38776
2016-05-31 21:45:07 +00:00
Michael Ow
c9f199a30f ICU-12564 Update copyright notice in ICU4C
X-SVN-Rev: 38761
2016-05-26 22:32:17 +00:00
Markus Scherer
a9c247a3cb ICU-12166 annotate intended switch case fallthroughs
X-SVN-Rev: 38447
2016-03-01 07:44:57 +00:00
Markus Scherer
0f0c7656d3 ICU-11832 some better error checking based on static code analysis
X-SVN-Rev: 37930
2015-09-10 01:42:34 +00:00
Markus Scherer
3d77fc18b8 ICU-11317 split out a new doAppend() from the more general doReplace(), each optimizing for different cases
X-SVN-Rev: 37601
2015-06-18 14:09:54 +00:00
Markus Scherer
884da1b2a9 ICU-10086 change non-member swap functions, use in-class definition of friend function; prevent self assignment of UnicodeString stack buffer (harmless but causes warnings)
X-SVN-Rev: 37498
2015-06-04 00:16:09 +00:00
Markus Scherer
f7e715daee ICU-10086 move & swap for UnicodeString, LocalPointer, LocalArray
X-SVN-Rev: 37469
2015-05-28 17:03:45 +00:00
Markus Scherer
1d4b6a6ec7 ICU-11551 new UNISTR_OBJECT_SIZE=64 for 27 UChars stored internally on 64-bit machine
X-SVN-Rev: 37339
2015-04-15 18:49:55 +00:00
Markus Scherer
c6fe872157 ICU-11336 recombine stack buffer arrays; one int16_t for short length & flags
X-SVN-Rev: 36754
2014-11-19 21:17:24 +00:00
Andy Heninger
4812b221aa ICU-10976 Remove C++ null reference checks; they're undefined behavior.
X-SVN-Rev: 35987
2014-07-02 20:57:26 +00:00
Markus Scherer
36663e1226 ICU-10407 more efficient UnicodeString::refCount()
X-SVN-Rev: 34367
2013-09-17 21:59:18 +00:00
Markus Scherer
1442c4ffcd ICU-9740 fix UnicodeString::getTerminatedBuffer() vs. truncated read-only alias
X-SVN-Rev: 34365
2013-09-17 21:44:35 +00:00
Andy Heninger
45561757cc ICU-10182 Build Time mutexes, merge from development branch.
X-SVN-Rev: 34139
2013-08-30 01:23:42 +00:00
Andy Heninger
ae87a3acc2 ICU-10051 Mutexes: introduce UInitOnce; remove UMTX_CHECK; replace all uses of UMTX_CHECK. All the directories this time.
X-SVN-Rev: 33788
2013-06-01 03:37:16 +00:00
Markus Scherer
891a08a70a ICU-9635 inline-implement the UnicodeString and Replaceable default constructors
X-SVN-Rev: 32781
2012-11-09 19:34:53 +00:00
Markus Scherer
33eb771977 ICU-9297 use memcmp() in UnicodeString::operator==()
X-SVN-Rev: 32552
2012-10-08 18:24:41 +00:00
Markus Scherer
7042fcca36 ICU-8890 revert error behavior of UnicodeString::replace(start, _length, srcChar) to removing the segment when srcChar is not a valid code point (see r31272)
X-SVN-Rev: 31928
2012-06-08 21:53:40 +00:00
Markus Scherer
0497efa1ad ICU-9059 check U16_APPEND() isError flag to avoid compiler warnings, even if we do not need it
X-SVN-Rev: 31272
2012-01-27 00:13:45 +00:00
Yoshito Umaoka
e9503bdade ICU-8909 Fixed various warnings reported by a source code analysis tool.
X-SVN-Rev: 30958
2011-11-14 19:32:51 +00:00
Markus Scherer
e31ce99b84 ICU-8575 option for not including utf headers by default; replace uses of deprecated utf_old.h macros
X-SVN-Rev: 30430
2011-07-27 05:53:56 +00:00
Markus Scherer
2862296471 ICU-8454 virtual destructors should be explicit, and defined in a .cpp file, so that they can serve as key functions
X-SVN-Rev: 30423
2011-07-26 05:32:25 +00:00
Markus Scherer
1beb0f1e4f ICU-8680 require C++ namespace, replace most U_NAMESPACE_QUALIFIER with icu::, remove still-draft U_STD_NS, U_STD_NSQ, and U_STD_NS_USE
X-SVN-Rev: 30281
2011-07-06 04:03:35 +00:00
Markus Scherer
493668a25f ICU-8573 remove support for U_IOSTREAM_SOURCE=198506
X-SVN-Rev: 30278
2011-07-05 23:42:32 +00:00
Markus Scherer
744d1f3a19 ICU-8617 move UHashTok into lower-level uelement.h (new) and rename to UElement to share with UVector
X-SVN-Rev: 30272
2011-07-04 23:51:56 +00:00
Markus Scherer
9f7d74001c ICU-8605 document & test ICU4C dependencies, remove cycles, reduce some deps; merged from branches/markus/depstest -r 30155:30193
X-SVN-Rev: 30194
2011-06-03 05:23:57 +00:00
Markus Scherer
d5599d7be9 ICU-8314 change Appendable into a base class, add UnicodeStringAppendable
X-SVN-Rev: 29392
2011-02-03 22:07:22 +00:00
Markus Scherer
d8ea46628b ICU-8314 Appendable interface, AppendableAdapter default impl & UnicodeString is-an Appendable
X-SVN-Rev: 29390
2011-02-03 05:28:01 +00:00
Markus Scherer
b674f702e1 ICU-8091 guard against pinIndices() reducing length to 0 or 1
X-SVN-Rev: 28982
2010-11-02 18:19:05 +00:00
Markus Scherer
334ad85355 ICU-8091 fix UnicodeString::reverse() for when the only lead surrogate is in the middle of an odd-length string
X-SVN-Rev: 28952
2010-10-29 00:15:27 +00:00
Andy Heninger
74e297291f ICU-7780 fix various compiler warnings
X-SVN-Rev: 28301
2010-07-12 18:03:29 +00:00
Markus Scherer
3360fe4708 ICU-7144 merge UTS #46 (IDNA2008) C/C++ feature into trunk, merging in -r 27794:28172 icu/branches/markus/uts46
X-SVN-Rev: 28195
2010-06-15 15:54:53 +00:00
Markus Scherer
8ddbd1394c ICU-7273 merge in Normalizer2 API & code, and ICU-5785 UnicodeSet::span(UnicodeString) and ICU-7296 tempSubString()/retainBetween(); merge -r 26971:27150 branches/markus/norm2
X-SVN-Rev: 27155
2010-01-06 23:50:03 +00:00
Markus Scherer
12be5b8ce0 ICU-6928 even simpler NUL-termination code, now only in getTerminatedBuffer(); insight: getTerminatedBuffer() can safely write a NUL even in a shared, allocated (kLongString & refCount()>1) buffer so no other code need NUL-terminate the buffer
X-SVN-Rev: 26007
2009-05-14 06:05:27 +00:00
Markus Scherer
b23ab3d19d ICU-6928 make not-writable UnicodeString buffers NUL-terminated if there is space, and NUL-terminate writable buffers if there is space; this is so valgrind and Purify don't complain about testing uninitialized memory
X-SVN-Rev: 26006
2009-05-13 21:05:51 +00:00
Markus Scherer
e74be582d0 ICU-6606 optimized away calls to u_getDefaultConverter() from UnicodeString code (constructors and extract()) if U_CHARSET_IS_UTF8
X-SVN-Rev: 25571
2009-03-12 21:24:54 +00:00
Markus Scherer
63ea2e06da ICU-6765 add API: StringPiece, ByteSink(s), UnicodeString::toUTF8() and fromUTF8()
X-SVN-Rev: 25519
2009-03-06 19:19:00 +00:00
Markus Scherer
311b29556f ICU-6677 add UnicodeString fromUTF32() and toUTF32() methods
X-SVN-Rev: 25448
2009-02-19 22:35:06 +00:00
Michael Ow
4667cbc378 ICU-6132 Check null pointer before dereferencing in unesctrn, unistr, and unum.
X-SVN-Rev: 23253
2008-01-16 22:58:59 +00:00
Markus Scherer
13270fbe6f ICU-5835 optimize UnicodeString: increase US_STACKBUF_SIZE from 7 to 13; optimize append() and unescape()
X-SVN-Rev: 22718
2007-09-28 04:50:25 +00:00
Markus Scherer
7bb221a187 ICU-5869 revert changes (r22476); too risky and needs further discussion; see ticket reply
X-SVN-Rev: 22607
2007-08-31 19:39:14 +00:00
George Rhoten
8620a4a530 ICU-5869 Properly NULL terminate strings that are not byte based, like UTF-16 or UTF-32.
X-SVN-Rev: 22476
2007-08-22 23:39:11 +00:00
George Rhoten
b27729b208 ICU-5304 Allow source code to work again without using U_NAMESPACE_USE
X-SVN-Rev: 20240
2006-09-03 17:08:23 +00:00
Eric Mader
41ca4f63ee ICU-4428 update copyright notices for ICU 3.3.
X-SVN-Rev: 17296
2005-03-08 22:49:59 +00:00
George Rhoten
54ccdd856b ICU-4281 Adding this virtual vector deleting destructor removes the dependency on caniter.obj on Windows.
The compiler automatically creates one in other .obj files, but not in unistr.obj because one isn't explicitly needed.

X-SVN-Rev: 17114
2005-01-12 19:15:42 +00:00
George Rhoten
70b126c727 ICU-4288 Fix some compiler warnings.
X-SVN-Rev: 16927
2004-12-08 01:05:40 +00:00
George Rhoten
106e91de6a ICU-4078 Make sure that some functions that need to use __cxa_pure_virtual from g++ are only defined in one object file, especially if they are only used by other class.
X-SVN-Rev: 16389
2004-10-04 04:27:52 +00:00