| 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;
|
|
|