Home | History | Annotate | Download | only in unicode

Lines Matching defs:StringPiece

25  * \brief C++ API: StringPiece: Read-only byte string wrapper class.
40 * in a "const char*" or a "string" wherever a "StringPiece" is
43 * Functions or methods may use const StringPiece& parameters to accept either
45 * a StringPiece.
47 * Systematic usage of StringPiece is encouraged as it will reduce unnecessary
52 class U_COMMON_API StringPiece : public UMemory {
59 * Default constructor, creates an empty StringPiece.
62 StringPiece() : ptr_(NULL), length_(0) { }
68 StringPiece(const char* str);
74 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) {