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

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

?? masterstring.h

?? 詳細講述了string的用法
?? H
?? 第 1 頁 / 共 3 頁
字號:
// masterstring - null terminated string manipulation 
// class hierarchy , as well as a large series of string related algorithims
// by jared bruni 
// my new string algorithims
// jared@lostsidedead.com

// some very important algorithims
// I totaly re-wrote all these from scratch
// so it would work better with the new masasm (my newest project)
// www.lostsidedead.com

// this source file is dedicated to my buds (hehe)


/************ Using MasterString ********************

  Within this source file consits of a series of
  algorithims and classes. You can inturn use these
  different aspects of the source to produce your
  own string classes, or to simply manipulate 
  char arrays. There are multiple levels of functionality
  as well as a few base classes for your classes to
  inhert from. This source is to be thought of as the
  layer ontop of string.h , allowing for simplicity
  as well as expanding the types of things it can do.

  The Functions**************************************

  All the simple functions with lowercased names, are
  the c-style functions. These allow you to pass a pointer
  to the character array, and manipulate it , in the way
  it describes (ex: findstr,stringcopy) etc these functions
  are very useful when directly manipulating character arrays
  and provide a much deeper form of control over the array.
  There are seires of different forms of string searches,
  which allow you to have full control. One of my favorite
  new ones which Im going to talk about here is findstrloc.
  findstrloc stands for find string location, its prototype is
  the following.

  void findstrloc(char* buff,char* search,MasStrDataLoc* dloc);

  This function cycles through the buffer, and every time it
  finds an instance of search, it leaves a refrence to it
  inside the MasStrDataLoc structure. Pretty nifty, but
  there are other ways to be able to cycle through all the
  characters, with very explicit searchs.

  findstr
  ifindstr
  findstrb
  ifindstrb

  etc

  These forms of searching for strings within your strings are
  extermly useful. They allow you to start off at the begining
  and then continue searching were you left off at. Allows you
  to search forward, backward, and even within a range of those
  two points. findstrcf (find string cycle forward) and findstrcb 
  (find string cycle backward). There are also a seires of functions
  that directly manipulate with ranges. These searchs, return a structure
  (MasStrRange) which contains two points. One for the starting location
  of the sub string, and one for were it stops. Pretty nifty when needing
  to have a full detailed structure of were things are at, to make
  the whole manipulation proccess easy. 


  The Classes / Structures *************************

  The next layer ontop of these functions, is the
  MasStrObj. This is a object, to use as a base
  object to inhert into your string classes, or
  whatever other class would need the structure
  of these functions.

  MasterString object

  The master string object, is a String class, which rather
  then attempting to just encapsulate all the string functionality
  it instead, trys to simplfy the proccess of using the object
  but still consist of the same amount of power. The MasterString
  inherts from MasStrObj, and then expands upon this to provide
  a autosizing string. It does this by creating a pointer to memory
  on the freestore, and then freeing that memory at appropriate times.
  It also has another layer, were the methods which use a form
  of hungarin notation (FindWindow LikeThis) automaticly point to the
  string within the Object. Let me give a example of this.

  theres the function findstr, and then the method within the
  MasterString object, FindString

  the following would be how you would call it

  char string1[100];
  stringcopy(string1, "stuff is x here");
  int placeval;
  placeval = findstr(string1,"x");

  using the MasterString , its actualy quite simpler

  MasterString str("stuff is x here");
  int placeval;
  placeval = str.FindString("x");

  When using the MasterString object, it basicly lets you
  encapsulate what character array the low level functions
  are pointing to, while still allowing you the ability
  to directly call any of the other functions.

  MasterStringList ********************************

  The MasterStringList class , is pretty simple to grasp
  and use. Its simply a class which holds a list of
  MasterStrings :)
  This class incorperates multiple inheritance one of my
  favorite features of the C++ language

  MasterINI ***************************************

  The MasterINI class is also fairly simple. It is a
  object that is kinda like a INI file. You basicly
  put in strings, by there name, and what the value is
  for that name, and it can then be saved & loaded.
  Its really easy to use / work, just remember to always
  create your size, or its gonna trip! example:

  MasterINI mstr(100); // allows 100 entrys

  MasterINI mstrx; // has no size
  mstrx.Create(100);// now has the size of 100 entrys


  - Jared Bruni

  Master@LostSideDead.com -

****************************************************/


#include <string.h>
#include <stdlib.h>
#include <windows.h>
#include <iostream.h>
#include <fstream.h>

#define NOTFOUND -1
#define INULL    -1
#define NOPREV   -1
#define NULLI    -1
#define STRBEGIN -1
#define MRANGE_HI 1
#define MRANGE_LO 0
#define NULLPOS  -1

// string algorithims
void stringcopy(char* dest,char* from); // string copy
void stringattach(char* dest,char* from); // string attach
void leftcopy(char* from,char* dest,int pos);// left copy (leftstr)
void rightcopy(char* from,char* dest,int pos);// right copy (rightstr)
void midcopy(char* from,char* dest,int start_pos,int stop_pos);// middle copy (midstr)
void trimspace(char* buff);// trim space characters
int findstr(char* buffer,char* search);// find string search
int ifindstr(int i,char* buffer,char* search);// find string search from position
int findstrb(char* buffer,char* search); // backwards search
int ifindstrb(int i,char* buffer,char* search); // inside backwards search
int fsearchstr(int start,int stop,char* buff,char* search);// fully controled range search (forward)
int bsearchstr(int start,int stop,char* buff,char* search);// fully controled range search (backward)
void removestr(char* buff,char* str);// remove instances of str in buff
int getlen(char* buff);// get length of the string
void lcase(char* buff);// lower case string
void ucase(char* buff);// upper case string
int  lcasel(int c);// lower case letter
int  ucasel(int c);// upper case letter
int  findoccurance(char* buff,char* search);// find occourances of a specific string
void convertinteger(int integer,char* buff,int base); // convert integer to string
int  convertstring(char* buff); // convert string to integer
bool ishexc(char c);// is this character a hexidecimal digit?
bool ishex(char* buff);// is this string a hexidecimal value?
int  hextointc(char c);// hexidecimal digit to integer value
int  hextoint(char* buff); // hexidecimal digits to integer value
int findoccourance(char* buff,char* search);// find the numeric of times a string occours
void tripcharup(char* buff,int upby);// bump the digits up X times
void tripchardown(char* buff,int downby);// dump the digits down  X times
void replacechar(char* string,char findchr,char replace);// replace single character, through out all instances
void replacestr(char* string,char* findstr,char* rep,char* output);// replace string inside string
void rmvinst(char* buff,char* findstr,char* replace,char* output); // remove single instance of string
char randomchar(int max);// produce a random character
char randomchar(int max,int up);// produce a random character, and then make it + up
void randomstr(char* buff,int char_max,int char_size);// random string
void removechar(char* input,char* output,char c); // remove characters from buffer
int  findchar(char* str,char c);// find single char (forward)
int  ifindchar(int start,char* str,char c); // inside find single char (forward)
int  findcharb(char* str,char c);// find single char (backward)
int  ifindcharb(int start,char* str,char c); // find single char backward ex
int  findcharcf(char* str,int start,int stop,char c);// find single char controled forward
int  findcharcb(char* str,int start,int stop,char c);// find single char controled backward
void removestr(char* input,char* output,char* string); // remove instance of string
void rmvstrx(char* buff,char* output,char* string); // remove single instance of string
void strsavefile(char* filename,char* string);// save the string as a text file
int  getfilestringlength(char* filename);// get the string length of a text file
bool strloadfile(char* filename,char* output);// load a string from a text file
void reversestring(char* input,char* output); // reverse sring
bool isstrvalid(char* string); // checks to see if the string is valid or not (is null terminated)
// string compares
bool mstrcmp(char* buff1,char* buff2); // case sensitive compare
bool mstrcmpx(char* buff1,char* buff2);// not case sensitive compare
bool insidestr(char* buff1,char* buff2); // am i inside this string?
bool insidestrx(char* buff1,char* buff2);// am i inside this string lowercased ?
void strsep(char* str, char* sleft, int go_left, char* sright, int go_right);// seperate into 2 seperate strings from 2 seperate points
void strsetnull(char* str,int pos); // reset the 0's position
void rmvnullset(char* str); // remove the 0 to end the string
int  getnullpos(char* str); // get the position of the null
void trimcom(char* buff, char* output, char startstr,char stopstr); 
void asmtrim(char* input,char* output);
int  countlines(char* buffer); // counts how many \n characters exisit
int  getfirstletter(char* buffer); // get first letter thats not a space

// string data location structure use w/ (findstrl)
struct MasStrDataLoc
{
	int* dindex;
	int  array_size;
	char* thestring;
	char* searchstr;
	bool search_status;

	inline MasStrDataLoc()
	{
		search_status = false;
		dindex = 0;
		array_size = 0;
		searchstr = 0;
	}
	
	inline ~MasStrDataLoc()
	{
		if(dindex != 0)
		{

		delete [] dindex;
		dindex = 0;

		}
		if(thestring != 0)
		{

		delete [] thestring;
		thestring = 0;

		}
		if(searchstr != 0)
		{

		delete [] searchstr;
		searchstr = 0;

		}
	}

	inline void create_array(int size)
	{
		dindex = new int[size];
		array_size = size;
	}

	inline void setstr(char* buff)
	{
		int len;
		len = strlen(buff);
		thestring = new char[len+1];
		stringcopy(thestring,buff);
	}

	inline void setstatus(bool x)
	{
		search_status = x;
	}

	inline void setsearchstr(char* buff)
	{
		int len;
		len = strlen(buff);
		searchstr = new char[len+1];
		stringcopy(searchstr,buff);
	}

	// return pointer to the string which the array holds data for
	inline char* getstr()
	{
		return thestring;
	}

	inline char* getsearchstr()
	{
		return searchstr;
	}

	inline int getarraysize()
	{
		return array_size;
	}

	inline int getstringpoint(int index)
	{
		if(index <= array_size)
		{

		return dindex[index];

		}
	}
	// maximum string points for search
	inline int getmaxpoint()
	{
		return array_size;
	}
	// get status
	inline bool getstatus()
	{
		return search_status;
	}

	inline bool wassearchsuccesful()
	{
		return getstatus();// was it succesfull?
	}
};
// find string location (dumps all locations into the location data structure (MasStrDataLoc))
bool findstrloc(char* buff,char* search,MasStrDataLoc* dloc);// standard
bool findstrlocf(char* buff,char* search,MasStrDataLoc* dloc);// forward
bool findstrlocb(char* buff,char* search,MasStrDataLoc* dloc);// backward

// master string range structure
struct MasStrRange
{
	int start_x;
	int stop_y;

	inline MasStrRange()
	{
		start_x = 0;
		stop_y = 0;
	}

	inline void SetRange(int x, int y)
	{
		start_x = x;
		stop_y = y;
	}

	inline int GetRangeX()
	{
		return start_x;
	}

	inline int GetRangeY()
	{
		return stop_y;
	}

	inline int GetRangeHI()
	{
		return start_x;
	}

	inline int GetRangeLO()
	{
		return stop_y;
	}

	inline int Clear()
	{
		start_x = 0;
		stop_y = 0;
	}
};

// range search structures for range style string manipulation
bool searchrange(char* buff,char* search,MasStrRange* mrang);
void copyleftrange(char* input,char* output,MasStrRange* mrang, int hi_lo);
void copyrightrange(char* input,char* output,MasStrRange* mrang,int hi_lo);
void copymidrange(char* input,char* output,MasStrRange* mrang, int hi_lo,MasStrRange* mrangx, int hi_lox);
bool isearchrange(int startx, char* buff,char* search,MasStrRange* mrang);

// master string list structure string data
struct MasStrList_String
{
	char* thestring;

	inline ~MasStrList_String()
	{
		delete [] thestring;
	}

	inline void set(char* buff)
	{
		int len;
		len = strlen(buff) + 1;
		thestring = new char[len];
		stringcopy(thestring,buff);
	}

	inline char* get()
	{
		return thestring;
	}
};
// master string list , list handler structure
struct MasStrList
{
	MasStrList_String* strings;
	int list_size;

	inline ~MasStrList()
	{
		delete [] strings;
	}

	inline MasStrList(int list_size)
	{
		create(list_size);
	}

	inline MasStrList()
	{
		list_size = 0;
		strings = NULL;
	}

	inline void create(int list_sizez)
	{
		list_size = list_sizez;
		strings = new MasStrList_String[list_size];
	}

	inline char* getstr(int index)
	{
		return strings[index].get();
	}

	inline int getcount()
	{
		return list_size;
	}
};

// create string list
void createstrlist(char* buffer, char* list_marker,MasStrList* list);


// charwrap  easy to use char array, that automaticly removes itself from freestore
struct charwrap
{
	char* str;

	inline charwrap(int size)
	{
		str = new char[size];
	}

	inline charwrap(char* buff)
	{
		set(buff);
	}

	inline charwrap(char* buff,bool x)
	{
		set(buff);
		strclearn();
	}

	inline ~charwrap()
	{
		delete [] str; // delete that shit
	}

	inline void set(char* buff)
	{
		int len;
		len = strlen(buff) + 1;
		str = new char[len];
		stringcopy(str,buff);
	}

	inline void snew(int size)
	{
		str = new char[size];
	}

	// clear off freestore
	inline void clear()
	{
		delete [] str;
		str = NULL;
	}

	inline void strclear()
	{
		int len;
		len = getlen(str);

		for(int i = 0; i < len; i++)
		{
			str[i] = 0;
		}
	}

	inline void strclearn()
	{
		stringcopy(str,"");
	}

	inline char* get()
	{
		return str;
	}

	inline int len()
	{
		return getlen(str);
	}

	inline void qmsg()
	{
		MessageBox(0,str,"QMSG",MB_OK|MB_ICONINFORMATION);
	}

};

// structure of string manipulation algorithims to use for objects to inhert
struct MasStrObj
{
    inline void mstr_stringcopy(char* input,char* output)
	{
		stringcopy(input,output);
	}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日本亚洲视频在线| 国产精品乱码久久久久久| 99精品久久99久久久久| 成人一级视频在线观看| 成人免费视频caoporn| 国产成人高清在线| 国产成人综合亚洲网站| 国产制服丝袜一区| 大白屁股一区二区视频| 成人爱爱电影网址| 97国产一区二区| 欧美伊人久久久久久久久影院| 色婷婷久久久综合中文字幕| 色综合久久久久综合99| 欧洲一区二区av| 欧美精品三级在线观看| 欧美变态tickle挠乳网站| 亚洲精品在线电影| 中文字幕中文字幕中文字幕亚洲无线| 国产精品女主播av| 亚洲成人tv网| 国产一区中文字幕| 丁香婷婷深情五月亚洲| 色哟哟一区二区在线观看| 欧美电影一区二区| 久久久久久久久久看片| 亚洲精品日产精品乱码不卡| 午夜视频久久久久久| 国产电影一区在线| 欧洲亚洲精品在线| 久久久久综合网| 一区二区久久久| 激情小说亚洲一区| 91老师片黄在线观看| 91精品国产日韩91久久久久久| 国产亚洲精品超碰| 亚洲女人****多毛耸耸8| 久久国产日韩欧美精品| av一区二区三区在线| 这里只有精品电影| 1000部国产精品成人观看| 丝瓜av网站精品一区二区| 丰满少妇在线播放bd日韩电影| 欧美日韩一区二区三区四区 | 欧美日韩欧美一区二区| 久久久亚洲国产美女国产盗摄 | 丝袜亚洲另类欧美综合| 成熟亚洲日本毛茸茸凸凹| 91精品欧美久久久久久动漫 | 国产日韩av一区| 婷婷亚洲久悠悠色悠在线播放| 国产精品一区二区男女羞羞无遮挡| 欧美自拍丝袜亚洲| 亚洲欧美日韩国产综合在线| 国产麻豆精品theporn| 欧美视频三区在线播放| 亚洲色图在线播放| 黑人巨大精品欧美黑白配亚洲| 欧美视频在线不卡| 一区二区三区在线播放| 成人综合婷婷国产精品久久| 欧美哺乳videos| 国产精品麻豆一区二区| 国产精品一二三四五| 久久这里只有精品首页| 久久精品av麻豆的观看方式| 欧美欧美欧美欧美首页| 一区二区三区欧美激情| 99re8在线精品视频免费播放| 国产精品美女久久久久aⅴ | 成人黄色电影在线| 精品国产一区二区三区四区四| 免费在线看一区| 欧美日韩国产另类一区| 亚欧色一区w666天堂| 在线成人av网站| 日韩精品三区四区| 欧美群妇大交群的观看方式| 日韩av中文字幕一区二区三区| 精品视频在线免费看| 午夜精品一区二区三区电影天堂| 欧美日韩一级二级| 日韩制服丝袜av| 日韩丝袜美女视频| 国产精品正在播放| 中文字幕乱码日本亚洲一区二区| av在线不卡免费看| 亚洲国产色一区| 91精品国产色综合久久| 精品在线视频一区| 欧美激情一区二区三区在线| 99这里只有精品| 亚洲成av人片在线| 久久影院午夜片一区| 成人免费高清在线| 亚洲激情欧美激情| 337p亚洲精品色噜噜噜| 国产乱子伦视频一区二区三区| 亚洲国产高清在线| 欧美日韩电影一区| 国产一区二区三区久久悠悠色av| 中文字幕av不卡| 日本精品一区二区三区四区的功能| 五月天欧美精品| 国产无一区二区| 欧美视频在线观看一区| 国产风韵犹存在线视精品| 一二三区精品福利视频| 精品少妇一区二区三区视频免付费| 成人福利在线看| 日韩va欧美va亚洲va久久| 国产欧美中文在线| 欧美一区二区视频在线观看2022| 国产精品自在在线| 亚洲自拍偷拍麻豆| 久久久久久久电影| 欧美日韩国产高清一区二区三区| 韩国精品主播一区二区在线观看| 亚洲欧美激情插| 国产亚洲精品aa| 日韩一区二区中文字幕| 在线亚洲+欧美+日本专区| 国产一区二区在线影院| 日韩综合一区二区| 亚洲精品视频一区| 亚洲国产高清在线| 欧美精品一区视频| 6080亚洲精品一区二区| 日本乱人伦一区| 成人av一区二区三区| 国产在线看一区| 日本在线不卡视频| 亚洲成av人影院| 亚洲自拍偷拍麻豆| 亚洲天堂福利av| 国产精品久久久久久妇女6080| 日韩午夜小视频| 日韩限制级电影在线观看| 欧美视频精品在线| 欧美在线视频全部完| www.欧美日韩| 福利一区二区在线观看| 国产精品自在在线| 国产精品乡下勾搭老头1| 激情六月婷婷久久| 精品影视av免费| 久久er99精品| 麻豆91在线看| 麻豆专区一区二区三区四区五区| 婷婷久久综合九色国产成人 | 日本不卡在线视频| 首页亚洲欧美制服丝腿| 日本中文一区二区三区| 美女在线视频一区| 蜜桃在线一区二区三区| 蜜桃视频在线观看一区| 久久精品国产秦先生| 免费成人美女在线观看.| 青草国产精品久久久久久| 免费成人结看片| 国模冰冰炮一区二区| 国产成人精品免费网站| 91丝袜国产在线播放| 日本高清视频一区二区| 91久久人澡人人添人人爽欧美| 色综合久久中文字幕| 欧美日韩情趣电影| 欧美一级免费观看| 国产亚洲1区2区3区| 亚洲三级在线播放| 亚洲午夜免费电影| 久色婷婷小香蕉久久| 紧缚捆绑精品一区二区| 国产成人三级在线观看| 色又黄又爽网站www久久| 欧美日韩www| 久久精品一区二区三区不卡| 国产精品久久久久影院老司| 亚洲一区视频在线观看视频| 狂野欧美性猛交blacked| 福利一区二区在线观看| 欧美中文一区二区三区| 精品国产123| 亚洲激情中文1区| 国内精品视频666| 色狠狠色噜噜噜综合网| 日韩一区二区中文字幕| 自拍偷拍国产精品| 久久99精品久久久久久国产越南| 粉嫩aⅴ一区二区三区四区 | 91一区二区三区在线观看| 欧美三级电影网| 久久久www免费人成精品| 樱花草国产18久久久久| 久久福利资源站| 欧亚洲嫩模精品一区三区| 精品国产免费人成电影在线观看四季| 亚洲色图19p| 国产原创一区二区三区| 777奇米成人网|