Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(168)

Unified Diff: source/common/charstr.h

Issue 1621843002: ICU 56 update step 1 (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/icu.git@561
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « source/common/caniter.cpp ('k') | source/common/charstr.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: source/common/charstr.h
diff --git a/source/common/charstr.h b/source/common/charstr.h
index 4b86c835f9a197f1bb74fb42ca0fdb977ac3387c..d2e20c4813ce1dd675d88d83f9ec848dc681dff0 100644
--- a/source/common/charstr.h
+++ b/source/common/charstr.h
@@ -1,6 +1,6 @@
/*
**********************************************************************
-* Copyright (c) 2001-2012, International Business Machines
+* Copyright (c) 2001-2015, International Business Machines
* Corporation and others. All Rights Reserved.
**********************************************************************
* Date Name Description
@@ -69,6 +69,9 @@ public:
const char *data() const { return buffer.getAlias(); }
char *data() { return buffer.getAlias(); }
+ /** @return last index of c, or -1 if c is not in this string */
+ int32_t lastIndexOf(char c) const;
+
CharString &clear() { len=0; buffer[0]=0; return *this; }
CharString &truncate(int32_t newLength);
@@ -114,6 +117,12 @@ public:
*/
CharString &appendPathPart(const StringPiece &s, UErrorCode &errorCode);
+ /**
+ * Appends a U_FILE_SEP_CHAR if this string is not empty
+ * and does not already end with a U_FILE_SEP_CHAR or U_FILE_ALT_SEP_CHAR.
+ */
+ CharString &ensureEndsWithFileSeparator(UErrorCode &errorCode);
+
private:
MaybeStackArray<char, 40> buffer;
int32_t len;
« no previous file with comments | « source/common/caniter.cpp ('k') | source/common/charstr.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698