亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? string.h

?? common c++提供socket
?? H
?? 第 1 頁 / 共 2 頁
字號:
// Copyright (C) 1999-2005 Open Source Telecom Corporation.//// This program is free software; you can redistribute it and/or modify// it under the terms of the GNU General Public License as published by// the Free Software Foundation; either version 2 of the License, or// (at your option) any later version.// // This program is distributed in the hope that it will be useful,// but WITHOUT ANY WARRANTY; without even the implied warranty of// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the// GNU General Public License for more details.// // You should have received a copy of the GNU General Public License// along with this program; if not, write to the Free Software// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.// // As a special exception, you may use this file as part of a free software// library without restriction.  Specifically, if other files instantiate// templates or use macros or inline functions from this file, or you compile// this file and link it with other files to produce an executable, this// file does not by itself cause the resulting executable to be covered by// the GNU General Public License.  This exception does not however    // invalidate any other reasons why the executable file might be covered by// the GNU General Public License.    //// This exception applies only to the code released under the name GNU// Common C++.  If you copy code from other releases into a copy of GNU// Common C++, as the General Public License permits, the exception does// not apply to the code that you add in this way.  To avoid misleading// anyone as to the status of such modified files, you must delete// this exception notice from them.//// If you write modifications of your own for GNU Common C++, it is your choice// whether to permit this exception to apply to your modifications.// If you do not wish that, delete this exception notice.///** * @file string.h * @short Common C++ generic string class **/#ifndef	CCXX_STRING_H_#define	CCXX_STRING_H_#ifndef	CCXX_MISSING_H_#include <cc++/missing.h>#endif#ifndef CCXX_STRCHAR_H_#include <cc++/strchar.h>#endif#ifdef	CCXX_NAMESPACESnamespace ost {#endifclass MemPager;/** * This is a generic and portable string class.  It uses optimized * memory allocation strategies to efficiently handle smaller string * content by grouping strings into 32 byte aligned slots that can * be re-allocated from a free list directly. * * While meant to cover the basic functionality of the ANSI C++ * string class in form and function, this class offers some important * enhancements, including the ability to derive class type specific * versions of itself.  The latter might be used to derive a unicode * string, a string for data and time data types, or to add case * insensitive comparisons, for example. * * @author David Sugar <dyfet@ostel.com> * @short Generic string class. */class __EXPORT String{protected:	static const unsigned minsize;	static const unsigned slotsize;	static const unsigned pagesize;	static const unsigned slotlimit;	static const unsigned slotcount;	friend class StringObject;private:	friend class MemPager;	static MemPager *pager;	static char **idx;#ifdef	CCXX_PACKED#pragma	pack(1)#endif	union	{		struct		{			char *text;			size_t size;			size_t length;		}	bigstring;		struct		{			char text[(sizeof(char *) + (sizeof(size_t) * 2) + 1)];			char length : 6;			bool big : 1;		}	ministring;	}	content;#ifdef	CCXX_PACKED#pragma	pack()#endifprotected:	/**	 * Determine if string is allocated in local variable or an	 * external reference.	 *	 * @return true if external heap is used.	 */	inline bool isBig(void) const		{return content.ministring.big;};	/**	 * Set the content of the string variable to the specified	 * string value, and use smart re-allocation strategies if	 * appropriate to shrink the size of the variable.		 *	 * @param str string to set.	 * @param len length of string if passed.	 */	const char *set(const char *str, size_t len = 0);	/**	 * Set the content of the string variable to that of another	 * variable.  Uses the string set method.	 *	 * @param str string to copy from.	 */	void set(const String &str);#ifdef	HAVE_SNPRINTF	/**	 * Set the content of the string variable to that of a	 * formatted printf style string.	 *	 * @param size of string data to set.	 * @param format of string to write into object.	 */	const char *set(size_t size, const char *format, ...);#endif	/**	 * Impliment the copy constructor, used internally.  Will always	 * create a minimum sized string allocation.	 *	 * @param str string to copy from.	 */	void copy(const String &str);	/**	 * Used to initialize a string object.	 */	void init(void);	/**	 * Used to fetch memory, if needed, based on the size, from the	 * pager, or the system heap.	 *	 * @return string pointer to space.	 * @param size of space needed.	 */	static char *getSpace(size_t size);	/**	 * Set the size of allocated space in the string variable	 * (capacity) to a known value.  The value is recomputed and	 * adjusted based on allocation method.	 *	 * @param size in bytes.	 */	size_t setSize(size_t size);	/**	 * Set the length value of the string content.	 *	 * @param len size in bytes.	 */	void setLength(size_t len);	/**	 * A derivable low level comparison operator.  This can be used	 * to create custom comparison data types in derived string	 * classes.	 *	 * @return 0 if match, or value for ordering.	 * @param text text to compare.	 * @param len length of text to compare.	 * @param index offset from start of string, used in searchs.	 */	virtual int compare(const char *text, size_t len = 0, size_t index = 0) const;	/**	 * An internal method used to search for a substring starting at 	 * a known offset.  Used by find and count methods.	 *	 * @return npos if fails, or offset to text found.	 * @param text text to search for.	 * @param clen length of search text.	 * @param offset offset to start from.	 */	size_t search(const char *text, size_t clen = 0, size_t offset = 0) const;public:	static const size_t npos;	typedef size_t size_type;	/**	 * Construct an empty string.	 */	String();	/**	 * Copy constructor.	 *	 * @param original string to copy from.	 */	String(const String &original);	/**	 * Create a string from a cstring.	 *	 * @param str text to set with.	 */	String(const char *str);	/**	 * Create a String from std::string.	 *	 * @param string from std::string to copy from.	 */	String(std::string string);	/**	 * Create a new string from a subset of another string.		 *	 * @param str reference of source string.		 * @param offset offset to start of data in prior string.	 * @param len length of our substring.	 */	String(const String &str, size_t offset, size_t len = npos);#ifdef	HAVE_SNPRINTF	/**	 * Create a string from formatted text input.	 *	 * @param size to allocate for our new string.	 * @param format of data to input.	 */	String(size_t size, const char *format, ...);#else        /**         * Create a string of a known size, and optionally fill with         * content.         *         * @param count size to allocate for our new string.         * @param str content to put into it.         */        String(size_t count, const char *str);#endif	/**	 * Fill a new string with character data.	 *	 * @param count size of new string.	 * @param fill char to fill string with.	 */	String(size_t count, const char fill = ' ');	/**	 * Destroy the string...	 */	virtual ~String();	/**	 * Get a string pointer to string content based on an indexed	 * offset.  A NULL is returned if the index is outsize of range.	 *	 * @return string content or NULL if invalid index.	 * @param index	 */	const char *getIndex(size_t index) const;	/**	 * Get the text of a string.	 *	 * @return string content.	 */	char *getText(void) const;	/**	 * Get the value of a string.	 *	 * @return string value as number.	 */	long getValue(long defvalue = 0l) const;	/**	 * Get the bool flag of a string.	 *	 * @return boolean value.	 */	bool getBool(bool defbool = false) const;	/**	 * Get the assigned length of string.	 *	 * @return string length.	 */	const size_t getLength(void) const;	/**	 * Get the allocation size of the string variable.	 *	 * @return allocation size.	 */	const size_t getSize(void) const;	/**	 * Return true if string is empty.	 *	 * @return true if string is empty string.	 */	bool isEmpty(void) const;	/**	 * Re-allocate buffer space for string.	 *	 * @param size new size to use.	 */	void resize(size_t size);	/**	 * Clear the contents of the entire string.	 */	void clear(void);	/**	 * Return a character at a known offset.	 *	 * @return character at offset.	 */	char at(ssize_t offset) const;	/**	 * Count the number of occurences of a specific string within	 * our string.	 *	 * @return count of instances.	 * @param s string to test.	 * @param offset offset to start from.	 */	unsigned count(const String &s, size_t offset = 0) const;	/**	 * Count the number of occurrences of a specific text pattern	 * within our string.	 *	 * @return count of instances.	 * @param s text pattern to find	 * @param offset offset to start from.	 	 * @param len length of text pattern if specified.	 */	unsigned count(const char *s, size_t offset = 0, size_t len = 0) const;	/**	 * Extract a new string as a token from the current string.	 *	 * @return string containing token.	 * @param delim deliminator characters.	 * @param offset offset to start from.	 */	String token(const char *delim = " \t\n\r", size_t offset = 0);	/**	 * Find the index to the nth instance of a substring in our string.	 *	 * @return index of found substring.	 * @param s string to search for.	 * @param offset offset to start at.	 * @param instance instance to look for.	 */	size_t find(const String &s, size_t offset = 0, unsigned instance = 1) const;	/**	 * Find last occurence of a substring in our string.	 *	 * @return index of last instance found,	 * @param s string to search for.	 * @param offset offset to start from.	 */	size_t rfind(const String &s, size_t offset = 0) const;        /**         * Find the index to the nth instance of text in our string.         *         * @return index of found substring.         * @param s string to search for.         * @param offset offset to start at.	 * @param len size of string text.         * @param count instance to look for.         */	size_t find(const char *s, size_t offset = 0, size_t len = 0, unsigned count = 1) const;       /**         * Find last occurence of a text in our string.         *         * @return index of last instance found,         * @param s string to search for.         * @param offset offset to start from.	 * @param len size of string to look for.	 */	size_t rfind(const char *s, size_t offset = 0, size_t len = 0) const;	/**	 * Trim trailing characters from a string.	 *	 * @param cs list of chars to trim.	 */	inline void trim(const char *cs)		{setLength(strtrim(cs, getText(), getLength()));};        /**         * Chop leading characters from a string.         *         * @param cs list of chars to chop.         */        inline void chop(const char *cs)                {setLength(strchop(cs, getText(), getLength()));};	/**	 * Strip lead and trailing characters from a string.	 *	 * @param cs list of chars to strip.	 */	void strip(const char *cs);

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲愉拍自拍另类高清精品| 亚洲一区二区视频在线观看| 在线成人av影院| 欧美在线观看禁18| 欧美日韩国产a| 欧美一二区视频| 精品免费国产二区三区| 国产三级精品三级| 国产精品情趣视频| 亚洲免费在线观看| 亚洲大片在线观看| 激情六月婷婷久久| 高清成人免费视频| 色94色欧美sute亚洲线路二| 欧美三级乱人伦电影| 日韩亚洲欧美成人一区| 久久久久国产精品人| 亚洲女同ⅹxx女同tv| 亚洲一卡二卡三卡四卡无卡久久 | 中文av一区二区| 亚洲婷婷在线视频| 污片在线观看一区二区| 国产在线视频一区二区| 成人sese在线| 777久久久精品| 国产日韩欧美精品一区| 亚洲高清视频在线| 国产精品一区二区91| 欧美性大战xxxxx久久久| 欧美v国产在线一区二区三区| 国产精品素人视频| 日韩激情视频网站| 97精品久久久久中文字幕| 制服丝袜一区二区三区| 日韩伦理电影网| 国精产品一区一区三区mba视频| 色婷婷久久一区二区三区麻豆| 精品日韩一区二区三区| 亚洲综合在线免费观看| 紧缚捆绑精品一区二区| 在线一区二区三区四区| 久久视频一区二区| 首页国产欧美久久| 99久久er热在这里只有精品15| 日韩精品一区二| 五月天久久比比资源色| 91在线观看免费视频| 久久久久免费观看| 喷水一区二区三区| 欧美日韩国产a| 亚洲综合自拍偷拍| 91蜜桃在线观看| 国产精品免费网站在线观看| 激情小说欧美图片| 日韩天堂在线观看| 亚洲成人tv网| 欧美日韩免费不卡视频一区二区三区| 中文字幕av不卡| 国产精品综合av一区二区国产馆| 91精品国产综合久久精品图片| 亚洲乱码日产精品bd| 99久久99精品久久久久久| 欧美国产乱子伦| 国产成人丝袜美腿| 国产日韩欧美一区二区三区综合| 激情综合五月天| 日韩欧美激情在线| 久久成人久久鬼色| 精品三级在线看| 国产一区三区三区| 久久久精品综合| 成人少妇影院yyyy| 日韩一区在线看| 91丨porny丨中文| 一区二区三区小说| 欧美在线视频日韩| 五月婷婷激情综合| 精品成人一区二区三区| 精品一区二区三区在线观看国产| 欧美一区二区三区在线观看| 七七婷婷婷婷精品国产| 精品国产电影一区二区| 国产伦理精品不卡| 国产精品午夜久久| 成人国产精品免费观看| 一区二区三区四区蜜桃| 欧美三级电影在线看| 免费成人小视频| 久久久亚洲精品一区二区三区| 国产成人免费视频| 亚洲美女屁股眼交3| 欧美日韩亚洲综合| 国产自产视频一区二区三区| 国产精品色在线| 色偷偷88欧美精品久久久 | 欧美日韩一区二区欧美激情 | 日韩欧美你懂的| 国产成人精品三级麻豆| 自拍偷自拍亚洲精品播放| 欧美亚洲尤物久久| 精品一区二区三区香蕉蜜桃| 久久久91精品国产一区二区精品| av电影在线观看一区| 亚洲va国产天堂va久久en| 日韩欧美一区二区不卡| av激情成人网| 美国十次了思思久久精品导航| 久久久一区二区| 欧美性做爰猛烈叫床潮| 久久se精品一区精品二区| 亚洲欧美日韩国产手机在线| 日韩欧美色电影| 91麻豆精品视频| 激情综合五月天| 亚洲gay无套男同| 国产精品国产自产拍在线| 欧美一区欧美二区| 91丝袜呻吟高潮美腿白嫩在线观看| 视频在线在亚洲| 亚洲精品日产精品乱码不卡| 精品国产凹凸成av人导航| 日本福利一区二区| 成人性生交大合| 国内精品视频666| 日精品一区二区三区| 亚洲欧洲另类国产综合| 亚洲精品一区二区三区99| 欧美日韩综合不卡| 色狠狠一区二区| 北条麻妃国产九九精品视频| 久久精品国产77777蜜臀| 亚洲午夜久久久久久久久久久| 中文字幕一区免费在线观看 | 国产成人免费视| 日产欧产美韩系列久久99| 亚洲图片激情小说| 国产精品久久免费看| 国产亚洲女人久久久久毛片| 日韩女优制服丝袜电影| 日韩精品一区二区三区蜜臀| 欧美电影一区二区三区| 欧美在线综合视频| 91国偷自产一区二区三区成为亚洲经典| 国产乱子伦视频一区二区三区 | 国产成人午夜片在线观看高清观看| 日韩高清在线一区| 亚洲高清免费观看高清完整版在线观看| 国产精品久久久99| ...中文天堂在线一区| 中文字幕色av一区二区三区| 国产精品蜜臀在线观看| 综合在线观看色| 亚洲另类春色国产| 亚洲国产成人porn| 日韩中文字幕亚洲一区二区va在线| 亚洲一区二区三区影院| 亚洲午夜精品网| 免费一级片91| 国精产品一区一区三区mba视频| 极品尤物av久久免费看| 国产**成人网毛片九色| 99国产精品久久久久久久久久 | 自拍偷拍欧美精品| 亚洲三级在线看| 亚洲一区电影777| 欧美a一区二区| 国产精品一区二区久久不卡| 不卡电影免费在线播放一区| 99re这里只有精品首页| 欧美久久久久久久久中文字幕| 91精品国产欧美一区二区| 日韩精品一区二区三区蜜臀 | 成人免费福利片| 欧美伊人久久久久久午夜久久久久| 在线观看网站黄不卡| 欧美日韩亚洲高清一区二区| 日韩一区二区在线看片| 久久精品一二三| 一区二区三区中文字幕电影 | 成人福利视频在线看| 在线观看日韩电影| 日韩欧美视频在线| 日韩美女视频一区二区| 青青草国产成人99久久| 成人综合婷婷国产精品久久免费| 色狠狠一区二区三区香蕉| 日韩亚洲欧美在线观看| 国产精品久久午夜夜伦鲁鲁| 日韩影院免费视频| 不卡高清视频专区| 日韩欧美中文字幕精品| 国产精品家庭影院| 老司机免费视频一区二区三区| 成人18视频日本| 日韩一区二区三区免费看| 亚洲品质自拍视频| 精品亚洲成av人在线观看| 欧美丝袜丝交足nylons图片| 国产欧美一区二区在线| 日本aⅴ免费视频一区二区三区|