Home | History | Annotate | Download | only in unicode

Lines Matching defs:StringPiece

27  * \brief C++ API: StringPiece: Read-only byte string wrapper class.
42 * in a "const char*" or a "string" wherever a "StringPiece" is
45 * Functions or methods may use StringPiece parameters to accept either a
47 * StringPiece.
49 * Systematic usage of StringPiece is encouraged as it will reduce unnecessary
54 class U_COMMON_API StringPiece : public UMemory {
61 * Default constructor, creates an empty StringPiece.
64 StringPiece() : ptr_(NULL), length_(0) { }
70 StringPiece(const char* str);
75 StringPiece(const std::string& str)
83 StringPiece(const char* offset, int32_t len) : ptr_(offset), length_(len) { }
85 * Substring of another StringPiece.
86 * @param x the other StringPiece
90 StringPiece(const StringPiece& x, int32_t pos);
92 * Substring of another StringPiece.
93 * @param x the other StringPiece
99 StringPiece(const StringPiece& x, int32_t pos, int32_t len);
138 * Reset the stringpiece to refer to new data.
146 * Reset the stringpiece to refer to new data.
189 * Returns a substring of this StringPiece.
193 * @return the substring StringPiece
196 StringPiece substr(int32_t pos, int32_t len = npos) const {
197 return StringPiece(*this, pos, len);
202 * Global operator == for StringPiece
203 * @param x The first StringPiece to compare.
204 * @param y The second StringPiece to compare.
209 operator==(const StringPiece& x, const StringPiece& y);
212 * Global operator != for StringPiece
213 * @param x The first StringPiece to compare.
214 * @param y The second StringPiece to compare.
218 inline UBool operator!=(const StringPiece& x, const StringPiece& y) {