SM0 She11
Path:
/
/
usr
/
include
/
unicode
Full Path (server): /usr/include/unicode
Create Fil3
Upl04d Fil3
📄 alphaindex.h
[E]
[D]
[R]
📄 appendable.h
[E]
[D]
[R]
📄 basictz.h
[E]
[D]
[R]
📄 bms.h
[E]
[D]
[R]
📄 bmsearch.h
[E]
[D]
[R]
📄 brkiter.h
[E]
[D]
[R]
📄 bytestream.h
[E]
[D]
[R]
📄 bytestrie.h
[E]
[D]
[R]
📄 bytestriebuilder.h
[E]
[D]
[R]
📄 calendar.h
[E]
[D]
[R]
📄 caniter.h
[E]
[D]
[R]
📄 chariter.h
[E]
[D]
[R]
📄 choicfmt.h
[E]
[D]
[R]
📄 coleitr.h
[E]
[D]
[R]
📄 coll.h
[E]
[D]
[R]
📄 colldata.h
[E]
[D]
[R]
📄 curramt.h
[E]
[D]
[R]
📄 currpinf.h
[E]
[D]
[R]
📄 currunit.h
[E]
[D]
[R]
📄 datefmt.h
[E]
[D]
[R]
📄 dbbi.h
[E]
[D]
[R]
📄 dcfmtsym.h
[E]
[D]
[R]
📄 decimfmt.h
[E]
[D]
[R]
📄 docmain.h
[E]
[D]
[R]
📄 dtfmtsym.h
[E]
[D]
[R]
📄 dtintrv.h
[E]
[D]
[R]
📄 dtitvfmt.h
[E]
[D]
[R]
📄 dtitvinf.h
[E]
[D]
[R]
📄 dtptngen.h
[E]
[D]
[R]
📄 dtrule.h
[E]
[D]
[R]
📄 enumset.h
[E]
[D]
[R]
📄 errorcode.h
[E]
[D]
[R]
📄 fieldpos.h
[E]
[D]
[R]
📄 fmtable.h
[E]
[D]
[R]
📄 format.h
[E]
[D]
[R]
📄 fpositer.h
[E]
[D]
[R]
📄 gender.h
[E]
[D]
[R]
📄 gregocal.h
[E]
[D]
[R]
📄 icudataver.h
[E]
[D]
[R]
📄 icuplug.h
[E]
[D]
[R]
📄 idna.h
[E]
[D]
[R]
📄 listformatter.h
[E]
[D]
[R]
📄 localpointer.h
[E]
[D]
[R]
📄 locdspnm.h
[E]
[D]
[R]
📄 locid.h
[E]
[D]
[R]
📄 measfmt.h
[E]
[D]
[R]
📄 measunit.h
[E]
[D]
[R]
📄 measure.h
[E]
[D]
[R]
📄 messagepattern.h
[E]
[D]
[R]
📄 msgfmt.h
[E]
[D]
[R]
📄 normalizer2.h
[E]
[D]
[R]
📄 normlzr.h
[E]
[D]
[R]
📄 numfmt.h
[E]
[D]
[R]
📄 numsys.h
[E]
[D]
[R]
📄 parseerr.h
[E]
[D]
[R]
📄 parsepos.h
[E]
[D]
[R]
📄 platform.h
[E]
[D]
[R]
📄 plurfmt.h
[E]
[D]
[R]
📄 plurrule.h
[E]
[D]
[R]
📄 ptypes.h
[E]
[D]
[R]
📄 putil.h
[E]
[D]
[R]
📄 rbbi.h
[E]
[D]
[R]
📄 rbnf.h
[E]
[D]
[R]
📄 rbtz.h
[E]
[D]
[R]
📄 regex.h
[E]
[D]
[R]
📄 rep.h
[E]
[D]
[R]
📄 resbund.h
[E]
[D]
[R]
📄 schriter.h
[E]
[D]
[R]
📄 search.h
[E]
[D]
[R]
📄 selfmt.h
[E]
[D]
[R]
📄 simpletz.h
[E]
[D]
[R]
📄 smpdtfmt.h
[E]
[D]
[R]
📄 sortkey.h
[E]
[D]
[R]
📄 std_string.h
[E]
[D]
[R]
📄 strenum.h
[E]
[D]
[R]
📄 stringpiece.h
[E]
[D]
[R]
📄 stringtriebuilder.h
[E]
[D]
[R]
📄 stsearch.h
[E]
[D]
[R]
📄 symtable.h
[E]
[D]
[R]
📄 tblcoll.h
[E]
[D]
[R]
📄 timezone.h
[E]
[D]
[R]
📄 tmunit.h
[E]
[D]
[R]
📄 tmutamt.h
[E]
[D]
[R]
📄 tmutfmt.h
[E]
[D]
[R]
📄 translit.h
[E]
[D]
[R]
📄 tzfmt.h
[E]
[D]
[R]
📄 tznames.h
[E]
[D]
[R]
📄 tzrule.h
[E]
[D]
[R]
📄 tztrans.h
[E]
[D]
[R]
📄 ubidi.h
[E]
[D]
[R]
📄 ubrk.h
[E]
[D]
[R]
📄 ucal.h
[E]
[D]
[R]
📄 ucasemap.h
[E]
[D]
[R]
📄 ucat.h
[E]
[D]
[R]
📄 uchar.h
[E]
[D]
[R]
📄 ucharstrie.h
[E]
[D]
[R]
📄 ucharstriebuilder.h
[E]
[D]
[R]
📄 uchriter.h
[E]
[D]
[R]
📄 uclean.h
[E]
[D]
[R]
📄 ucnv.h
[E]
[D]
[R]
📄 ucnv_cb.h
[E]
[D]
[R]
📄 ucnv_err.h
[E]
[D]
[R]
📄 ucnvsel.h
[E]
[D]
[R]
📄 ucol.h
[E]
[D]
[R]
📄 ucoleitr.h
[E]
[D]
[R]
📄 uconfig.h
[E]
[D]
[R]
📄 ucsdet.h
[E]
[D]
[R]
📄 ucurr.h
[E]
[D]
[R]
📄 udat.h
[E]
[D]
[R]
📄 udata.h
[E]
[D]
[R]
📄 udateintervalformat.h
[E]
[D]
[R]
📄 udatpg.h
[E]
[D]
[R]
📄 udisplaycontext.h
[E]
[D]
[R]
📄 uenum.h
[E]
[D]
[R]
📄 ugender.h
[E]
[D]
[R]
📄 uidna.h
[E]
[D]
[R]
📄 uiter.h
[E]
[D]
[R]
📄 uldnames.h
[E]
[D]
[R]
📄 uloc.h
[E]
[D]
[R]
📄 ulocdata.h
[E]
[D]
[R]
📄 umachine.h
[E]
[D]
[R]
📄 umisc.h
[E]
[D]
[R]
📄 umsg.h
[E]
[D]
[R]
📄 unifilt.h
[E]
[D]
[R]
📄 unifunct.h
[E]
[D]
[R]
📄 unimatch.h
[E]
[D]
[R]
📄 unirepl.h
[E]
[D]
[R]
📄 uniset.h
[E]
[D]
[R]
📄 unistr.h
[E]
[D]
[R]
📄 unorm.h
[E]
[D]
[R]
📄 unorm2.h
[E]
[D]
[R]
📄 unum.h
[E]
[D]
[R]
📄 uobject.h
[E]
[D]
[R]
📄 upluralrules.h
[E]
[D]
[R]
📄 uregex.h
[E]
[D]
[R]
📄 urename.h
[E]
[D]
[R]
📄 urep.h
[E]
[D]
[R]
📄 ures.h
[E]
[D]
[R]
📄 uscript.h
[E]
[D]
[R]
📄 usearch.h
[E]
[D]
[R]
📄 uset.h
[E]
[D]
[R]
📄 usetiter.h
[E]
[D]
[R]
📄 ushape.h
[E]
[D]
[R]
📄 uspoof.h
[E]
[D]
[R]
📄 usprep.h
[E]
[D]
[R]
📄 ustdio.h
[E]
[D]
[R]
📄 ustream.h
[E]
[D]
[R]
📄 ustring.h
[E]
[D]
[R]
📄 ustringtrie.h
[E]
[D]
[R]
📄 utext.h
[E]
[D]
[R]
📄 utf.h
[E]
[D]
[R]
📄 utf16.h
[E]
[D]
[R]
📄 utf32.h
[E]
[D]
[R]
📄 utf8.h
[E]
[D]
[R]
📄 utf_old.h
[E]
[D]
[R]
📄 utmscale.h
[E]
[D]
[R]
📄 utrace.h
[E]
[D]
[R]
📄 utrans.h
[E]
[D]
[R]
📄 utypes.h
[E]
[D]
[R]
📄 uvernum.h
[E]
[D]
[R]
📄 uversion.h
[E]
[D]
[R]
📄 vtzone.h
[E]
[D]
[R]
Editing: stringpiece.h
// Copyright (C) 2009-2012, International Business Machines // Corporation and others. All Rights Reserved. // // Copyright 2001 and onwards Google Inc. // Author: Sanjay Ghemawat // This code is a contribution of Google code, and the style used here is // a compromise between the original Google code and the ICU coding guidelines. // For example, data types are ICU-ified (size_t,int->int32_t), // and API comments doxygen-ified, but function names and behavior are // as in the original, if possible. // Assertion-style error handling, not available in ICU, was changed to // parameter "pinning" similar to UnicodeString. // // In addition, this is only a partial port of the original Google code, // limited to what was needed so far. The (nearly) complete original code // is in the ICU svn repository at icuhtml/trunk/design/strings/contrib // (see ICU ticket 6765, r25517). #ifndef __STRINGPIECE_H__ #define __STRINGPIECE_H__ /** * \file * \brief C++ API: StringPiece: Read-only byte string wrapper class. */ #include "unicode/utypes.h" #include "unicode/uobject.h" #include "unicode/std_string.h" // Arghh! I wish C++ literals were "string". U_NAMESPACE_BEGIN /** * A string-like object that points to a sized piece of memory. * * We provide non-explicit singleton constructors so users can pass * in a "const char*" or a "string" wherever a "StringPiece" is * expected. * * Functions or methods may use const StringPiece& parameters to accept either * a "const char*" or a "string" value that will be implicitly converted to * a StringPiece. * * Systematic usage of StringPiece is encouraged as it will reduce unnecessary * conversions from "const char*" to "string" and back again. * * @stable ICU 4.2 */ class U_COMMON_API StringPiece : public UMemory { private: const char* ptr_; int32_t length_; public: /** * Default constructor, creates an empty StringPiece. * @stable ICU 4.2 */ StringPiece() : ptr_(NULL), length_(0) { } /** * Constructs from a NUL-terminated const char * pointer. * @param str a NUL-terminated const char * pointer * @stable ICU 4.2 */ StringPiece(const char* str); #if U_HAVE_STD_STRING /** * Constructs from a std::string. * @stable ICU 4.2 */ StringPiece(const std::string& str) : ptr_(str.data()), length_(static_cast<int32_t>(str.size())) { } #endif /** * Constructs from a const char * pointer and a specified length. * @param offset a const char * pointer (need not be terminated) * @param len the length of the string; must be non-negative * @stable ICU 4.2 */ StringPiece(const char* offset, int32_t len) : ptr_(offset), length_(len) { } /** * Substring of another StringPiece. * @param x the other StringPiece * @param pos start position in x; must be non-negative and <= x.length(). * @stable ICU 4.2 */ StringPiece(const StringPiece& x, int32_t pos); /** * Substring of another StringPiece. * @param x the other StringPiece * @param pos start position in x; must be non-negative and <= x.length(). * @param len length of the substring; * must be non-negative and will be pinned to at most x.length() - pos. * @stable ICU 4.2 */ StringPiece(const StringPiece& x, int32_t pos, int32_t len); /** * Returns the string pointer. May be NULL if it is empty. * * data() may return a pointer to a buffer with embedded NULs, and the * returned buffer may or may not be null terminated. Therefore it is * typically a mistake to pass data() to a routine that expects a NUL * terminated string. * @return the string pointer * @stable ICU 4.2 */ const char* data() const { return ptr_; } /** * Returns the string length. Same as length(). * @return the string length * @stable ICU 4.2 */ int32_t size() const { return length_; } /** * Returns the string length. Same as size(). * @return the string length * @stable ICU 4.2 */ int32_t length() const { return length_; } /** * Returns whether the string is empty. * @return TRUE if the string is empty * @stable ICU 4.2 */ UBool empty() const { return length_ == 0; } /** * Sets to an empty string. * @stable ICU 4.2 */ void clear() { ptr_ = NULL; length_ = 0; } /** * Reset the stringpiece to refer to new data. * @param xdata pointer the new string data. Need not be nul terminated. * @param len the length of the new data * @stable ICU 4.8 */ 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. * @stable ICU 4.8 */ void set(const char* str); /** * Removes the first n string units. * @param n prefix length, must be non-negative and <=length() * @stable ICU 4.2 */ void remove_prefix(int32_t n) { if (n >= 0) { if (n > length_) { n = length_; } ptr_ += n; length_ -= n; } } /** * Removes the last n string units. * @param n suffix length, must be non-negative and <=length() * @stable ICU 4.2 */ void remove_suffix(int32_t n) { if (n >= 0) { if (n <= length_) { length_ -= n; } else { length_ = 0; } } } /** * Maximum integer, used as a default value for substring methods. * @stable ICU 4.2 */ static const int32_t npos = 0x7fffffff; /** * Returns a substring of this StringPiece. * @param pos start position; must be non-negative and <= length(). * @param len length of the substring; * must be non-negative and will be pinned to at most length() - pos. * @return the substring StringPiece * @stable ICU 4.2 */ StringPiece substr(int32_t pos, int32_t len = npos) const { return StringPiece(*this, pos, len); } }; /** * Global operator == for StringPiece * @param x The first StringPiece to compare. * @param y The second StringPiece to compare. * @return TRUE if the string data is equal * @stable ICU 4.8 */ U_EXPORT UBool U_EXPORT2 operator==(const StringPiece& x, const StringPiece& y); /** * Global operator != for StringPiece * @param x The first StringPiece to compare. * @param y The second StringPiece to compare. * @return TRUE if the string data is not equal * @stable ICU 4.8 */ inline UBool operator!=(const StringPiece& x, const StringPiece& y) { return !(x == y); } U_NAMESPACE_END #endif // __STRINGPIECE_H__
Save