-// Copyright (C) 2010, International Business Machines
+// Copyright (C) 2009-2013, International Business Machines
// Corporation and others. All Rights Reserved.
//
// Copyright 2001 and onwards Google Inc.
* Constructs from a std::string.
* @stable ICU 4.2
*/
- StringPiece(const U_STD_NSQ string& str)
+ StringPiece(const std::string& str)
: ptr_(str.data()), length_(static_cast<int32_t>(str.size())) { }
#endif
/**
/**
* Reset the stringpiece to refer to new data.
- * @param data pointer the new string data. Need not be nul terminated.
+ * @param xdata pointer the new string data. Need not be nul terminated.
* @param len the length of the new data
- * @internal
+ * @stable ICU 4.8
*/
- void set(const char* data, int32_t len) { ptr_ = data; length_ = len; }
+ void set(const char* xdata, int32_t len) { ptr_ = xdata; length_ = len; }
/**
* Reset the stringpiece to refer to new data.
* @param str a pointer to a NUL-terminated string.
- * @internal
+ * @stable ICU 4.8
*/
void set(const char* str);
* Maximum integer, used as a default value for substring methods.
* @stable ICU 4.2
*/
- static const int32_t npos = 0x7fffffff;
+ static const int32_t npos; // = 0x7fffffff;
/**
* Returns a substring of this StringPiece.
* @param x The first StringPiece to compare.
* @param y The second StringPiece to compare.
* @return TRUE if the string data is equal
- * @internal
+ * @stable ICU 4.8
*/
U_EXPORT UBool U_EXPORT2
operator==(const StringPiece& x, const StringPiece& y);
* @param x The first StringPiece to compare.
* @param y The second StringPiece to compare.
* @return TRUE if the string data is not equal
- * @internal
+ * @stable ICU 4.8
*/
inline UBool operator!=(const StringPiece& x, const StringPiece& y) {
return !(x == y);