当前位置: 首页>>代码示例>>C++>>正文


C++ appendChar函数代码示例

本文整理汇总了C++中appendChar函数的典型用法代码示例。如果您正苦于以下问题:C++ appendChar函数的具体用法?C++ appendChar怎么用?C++ appendChar使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了appendChar函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: N_NIMCALL

N_NIMCALL(NimStringDesc*, ntgetClockStr)(void) {
	NimStringDesc* result;
	Timeinfo105404 ti;
	time_t LOC1;
	NimStringDesc* LOC2;
	NimStringDesc* LOC3;
	NimStringDesc* LOC4;
	NimStringDesc* LOC5;
	result = 0;
	memset((void*)(&ti), 0, sizeof(ti));
	ti.Sup.m_type = (&NTI105404);
	LOC1 = 0;
	LOC1 = gettime_105438();
	chckNil((void*)(&ti));
	memset((void*)(&ti), 0, sizeof(ti));
	ti.Sup.m_type = (&NTI105404);
	getlocaltime_105440(LOC1, (&ti));
	LOC2 = 0;
	LOC3 = 0;
	LOC3 = nsuIntToStr(((NI) (ti.hour)), ((NI) 2));
	LOC4 = 0;
	LOC4 = nsuIntToStr(((NI) (ti.minute)), ((NI) 2));
	LOC5 = 0;
	LOC5 = nsuIntToStr(((NI) (ti.second)), ((NI) 2));
	LOC2 = rawNewString(LOC3->Sup.len + LOC4->Sup.len + LOC5->Sup.len + 2);
appendString(LOC2, LOC3);
appendChar(LOC2, 58);
appendString(LOC2, LOC4);
appendChar(LOC2, 58);
appendString(LOC2, LOC5);
	result = LOC2;
	return result;
}
开发者ID:StetHD,项目名称:csources,代码行数:33,代码来源:stdlib_times.c

示例2: N_NIMCALL

N_NIMCALL(NimStringDesc*, ntgetClockStr)(void) {
    NimStringDesc* Result_30014;
    TY28602 Ti_30015;
    NI LOC1;
    NimStringDesc* LOC2;
    NimStringDesc* LOC3;
    NimStringDesc* LOC4;
    NimStringDesc* LOC5;
    Result_30014 = 0;
    memset((void*)&Ti_30015, 0, sizeof(Ti_30015));
    LOC1 = Gettime_28616();
    Ti_30015 = Getlocaltime_28618(LOC1);
    Ti_30015.Sup.m_type = NTI28602;
    LOC2 = 0;
    LOC3 = 0;
    LOC3 = nsuIntToStr(((NI) (Ti_30015.Hour)), 2);
    LOC4 = 0;
    LOC4 = nsuIntToStr(((NI) (Ti_30015.Minute)), 2);
    LOC5 = 0;
    LOC5 = nsuIntToStr(((NI) (Ti_30015.Second)), 2);
    LOC2 = rawNewString(LOC3->Sup.len + LOC4->Sup.len + LOC5->Sup.len + 2);
    appendString(LOC2, LOC3);
    appendChar(LOC2, 58);
    appendString(LOC2, LOC4);
    appendChar(LOC2, 58);
    appendString(LOC2, LOC5);
    Result_30014 = LOC2;
    return Result_30014;
}
开发者ID:ddlsmurf,项目名称:Nimrod,代码行数:29,代码来源:times.c

示例3: N_NIMCALL

N_NIMCALL(NimStringDesc*, ntgetDateStr)(void) {
	NimStringDesc* result;
	Timeinfo102408 ti;
	time_t LOC1;
	NimStringDesc* LOC2;
	NimStringDesc* LOC3;
	NimStringDesc* LOC4;
	NimStringDesc* LOC5;
	result = 0;
	memset((void*)(&ti), 0, sizeof(ti));
	ti.Sup.m_type = (&NTI102408);
	LOC1 = 0;
	LOC1 = gettime_102452();
	chckNil((void*)(&ti));
	memset((void*)(&ti), 0, sizeof(ti));
	ti.Sup.m_type = (&NTI102408);
	getlocaltime_102457(LOC1, (&ti));
	LOC2 = 0;
	LOC3 = 0;
	LOC3 = nimIntToStr(((NI) (ti.year)));
	LOC4 = 0;
	LOC4 = nsuIntToStr(((NI) ((NI)(((NI) (ti.month)) + ((NI) 1)))), ((NI) 2));
	LOC5 = 0;
	LOC5 = nsuIntToStr(((NI) (ti.monthday)), ((NI) 2));
	LOC2 = rawNewString(LOC3->Sup.len + LOC4->Sup.len + LOC5->Sup.len + 2);
appendString(LOC2, LOC3);
appendChar(LOC2, 45);
appendString(LOC2, LOC4);
appendChar(LOC2, 45);
appendString(LOC2, LOC5);
	result = LOC2;
	return result;
}
开发者ID:jlp765,项目名称:csources,代码行数:33,代码来源:stdlib_times.c

示例4: N_NIMCALL

N_NIMCALL(NimStringDesc*, Tocchar_155007)(NIM_CHAR C_155009) {
NimStringDesc* Result_155176;
NimStringDesc* LOC1;
NimStringDesc* LOC2;
NimStringDesc* LOC3;
Result_155176 = 0;
switch (((NU8)(C_155009))) {
case 0 ... 31:
case 128 ... 255:
LOC1 = 0;
LOC2 = 0;
LOC2 = nsuToOctal(C_155009);
LOC1 = rawNewString(LOC2->Sup.len + 1);
appendChar(LOC1, 92);
appendString(LOC1, LOC2);
Result_155176 = LOC1;
break;
case 39:
case 34:
case 92:
LOC3 = 0;
LOC3 = rawNewString(2);
appendChar(LOC3, 92);
appendChar(LOC3, C_155009);
Result_155176 = LOC3;
break;
default:
Result_155176 = nimCharToStr(C_155009);
break;
}
return Result_155176;
}
开发者ID:ddlsmurf,项目名称:Nimrod,代码行数:32,代码来源:ccgutils.c

示例5: N_NIMCALL

N_NIMCALL(NimStringDesc*, shortendir_114403)(NimStringDesc* dir) {
	NimStringDesc* result;
	NimStringDesc* prefix;
	NimStringDesc* LOC1;
	NimStringDesc* LOC2;
	NimStringDesc* LOC8;
	nimfr("shortenDir", "options.nim")
	result = 0;
	nimln(196, "options.nim");
	nimln(196, "options.nim");
	LOC1 = 0;
	nimln(196, "options.nim");
	LOC2 = 0;
	LOC2 = getprefixdir_114311();
	LOC1 = rawNewString(LOC2->Sup.len + 1);
appendString(LOC1, LOC2);
appendChar(LOC1, 47);
	prefix = LOC1;
	nimln(197, "options.nim");
	{
		NIM_BOOL LOC5;
		nimln(197, "options.nim");
		LOC5 = 0;
		LOC5 = nsuStartsWith(dir, prefix);
		if (!LOC5) goto LA6;
		nimln(198, "options.nim");
		nimln(198, "options.nim");
		nimln(198, "options.nim");
		nimln(198, "options.nim");
		result = copyStr(dir, prefix->Sup.len);
		goto BeforeRet;
	}	LA6: ;
	nimln(199, "options.nim");
	nimln(199, "options.nim");
	LOC8 = 0;
	LOC8 = rawNewString(gprojectpath_114198->Sup.len + 1);
appendString(LOC8, gprojectpath_114198);
appendChar(LOC8, 47);
	prefix = LOC8;
	nimln(200, "options.nim");
	{
		NIM_BOOL LOC11;
		nimln(200, "options.nim");
		LOC11 = 0;
		LOC11 = nsuStartsWith(dir, prefix);
		if (!LOC11) goto LA12;
		nimln(201, "options.nim");
		nimln(201, "options.nim");
		nimln(201, "options.nim");
		nimln(201, "options.nim");
		result = copyStr(dir, prefix->Sup.len);
		goto BeforeRet;
	}	LA12: ;
	nimln(202, "options.nim");
	result = copyString(dir);
	BeforeRet: ;	popFrame();
	return result;
}
开发者ID:rbehrends,项目名称:csources,代码行数:58,代码来源:compiler_options.c

示例6: prepareToAddContents

 //---------------------------------------------------------------
 void StreamWriter::appendValues ( unsigned int number, unsigned int number2 )
 {
     prepareToAddContents();
     if ( mOpenTags.back().mHasText ) appendChar ( ' ' );
     appendNumber ( number );
     appendChar ( ' ' );
     appendNumber ( number2 );
     mOpenTags.back().mHasText = true;
 }
开发者ID:3dfreeman,项目名称:OpenCOLLADA,代码行数:10,代码来源:COLLADASWStreamWriter.cpp

示例7: N_NIMCALL

N_NIMCALL(NimStringDesc*, Shortendir_41200)(NimStringDesc* Dir_41202) {
    NimStringDesc* Result_41203;
    NimStringDesc* Prefix_41204;
    NimStringDesc* LOC1;
    NimStringDesc* LOC2;
    NIM_BOOL LOC4;
    NimStringDesc* LOC7;
    NimStringDesc* LOC8;
    NIM_BOOL LOC10;
    NimStringDesc* LOC13;
    NIM_BOOL LOC15;
    Result_41203 = 0;
    Prefix_41204 = 0;
    LOC1 = 0;
    LOC2 = 0;
    LOC2 = Getprefixdir_41109();
    LOC1 = rawNewString(LOC2->Sup.len + 1);
    appendString(LOC1, LOC2);
    appendChar(LOC1, 92);
    Prefix_41204 = LOC1;
    LOC4 = nsuStartsWith(Dir_41202, Prefix_41204);
    if (!LOC4) goto LA5;
    Result_41203 = copyStr(Dir_41202, Prefix_41204->Sup.len);
    goto BeforeRet;
LA5:
    ;
    LOC7 = 0;
    LOC8 = 0;
    LOC8 = nosgetCurrentDir();
    LOC7 = rawNewString(LOC8->Sup.len + 1);
    appendString(LOC7, LOC8);
    appendChar(LOC7, 92);
    Prefix_41204 = LOC7;
    LOC10 = nsuStartsWith(Dir_41202, Prefix_41204);
    if (!LOC10) goto LA11;
    Result_41203 = copyStr(Dir_41202, Prefix_41204->Sup.len);
    goto BeforeRet;
LA11:
    ;
    LOC13 = 0;
    LOC13 = rawNewString(Projectpath_41113->Sup.len + 1);
    appendString(LOC13, Projectpath_41113);
    appendChar(LOC13, 92);
    Prefix_41204 = LOC13;
    LOC15 = nsuStartsWith(Dir_41202, Prefix_41204);
    if (!LOC15) goto LA16;
    Result_41203 = copyStr(Dir_41202, Prefix_41204->Sup.len);
    goto BeforeRet;
LA16:
    ;
    Result_41203 = copyString(Dir_41202);
BeforeRet:
    ;
    return Result_41203;
}
开发者ID:ddlsmurf,项目名称:Nimrod,代码行数:55,代码来源:options.c

示例8: COLLADABU_ASSERT

    //---------------------------------------------------------------
    void StreamWriter::appendURIAttribute ( const String &name, const COLLADABU::URI &uri )
    {
        COLLADABU_ASSERT ( !mOpenTags.back().mHasContents );

		appendChar ( ' ' );
		appendNCNameString ( name );
		appendChar ( '=' );
		appendChar ( '\"' );
		appendString ( COLLADABU::StringUtils::translateToXML(uri.getURIString()) );
		appendChar ( '\"' );
    }
开发者ID:3dfreeman,项目名称:OpenCOLLADA,代码行数:12,代码来源:COLLADASWStreamWriter.cpp

示例9: appendChar

void ByteStringExtractor::outputString() {
  if(m_strLength >= (int)m_minLength) {
    appendChar('\0');
    printString(m_buf);
  }
  m_strLength = 0;
}
开发者ID:JesperMikkelsen,项目名称:Big-Numbers,代码行数:7,代码来源:ByteStringExstraftor.cpp

示例10: N_NIMCALL

N_NIMCALL(void, setstyle_190601_4182131368)(FILE* f0, Style190404Set style0) {
	{
		Style190404 s_190837_4182131368;
		NI i_190851_4182131368;
		s_190837_4182131368 = (Style190404)0;
		i_190851_4182131368 = ((NI) 1);
		{
			while (1) {
				if (!(i_190851_4182131368 <= ((NI) 8))) goto LA3;
				{
					NimStringDesc* LOC8;
					NimStringDesc* LOC9;
					if (!((style0 &(1U<<((NU)((((Style190404) (i_190851_4182131368))- 1))&7U)))!=0)) goto LA6;
					s_190837_4182131368 = ((Style190404) (i_190851_4182131368));
					LOC8 = (NimStringDesc*)0;
					LOC9 = (NimStringDesc*)0;
					LOC9 = nimIntToStr(((NI) (s_190837_4182131368)));
					LOC8 = rawNewString(LOC9->Sup.len + 3);
appendString(LOC8, ((NimStringDesc*) &T4182131368_2));
appendString(LOC8, LOC9);
appendChar(LOC8, 109);
					write_14891_1689653243(f0, LOC8);
				}
				LA6: ;
				i_190851_4182131368 += ((NI) 1);
			} LA3: ;
		}
	}
}
开发者ID:FedericoCeratto,项目名称:debian-nim,代码行数:29,代码来源:stdlib_terminal.c

示例11: N_NIMCALL

N_NIMCALL(NimStringDesc*, getvalue_112975)(tstringtable112610* t, NU8 flags, NimStringDesc* key) {
	NimStringDesc* result;
	nimfr("getValue", "strtabs.nim")
	result = 0;
	nimln(150, "strtabs.nim");
	{
		NIM_BOOL LOC3;
		nimln(150, "strtabs.nim");
		LOC3 = 0;
		LOC3 = nsthasKey(t, key);
		if (!LOC3) goto LA4;
		nimln(150, "strtabs.nim");
		nimln(150, "strtabs.nim");
		result = nstGet(t, key);
		goto BeforeRet;
	}	LA4: ;
	nimln(152, "strtabs.nim");
	{
		nimln(730, "system.nim");
		if (!((flags &(1<<((((NU8) 0))&7)))!=0)) goto LA8;
		nimln(152, "strtabs.nim");
		nimln(152, "strtabs.nim");
		result = getenv_104625(key);
	}	goto LA6;
	LA8: ;
	{
		nimln(153, "strtabs.nim");
		result = copyString(((NimStringDesc*) &TMP284));
	}	LA6: ;
	nimln(154, "strtabs.nim");
	{
		nimln(154, "strtabs.nim");
		nimln(154, "strtabs.nim");
		if (!(result->Sup.len == 0)) goto LA13;
		nimln(155, "strtabs.nim");
		{
			NimStringDesc* LOC19;
			nimln(730, "system.nim");
			if (!((flags &(1<<((((NU8) 2))&7)))!=0)) goto LA17;
			nimln(155, "strtabs.nim");
			nimln(155, "strtabs.nim");
			LOC19 = 0;
			LOC19 = rawNewString(key->Sup.len + 1);
appendChar(LOC19, 36);
appendString(LOC19, key);
			result = LOC19;
		}		goto LA15;
		LA17: ;
		{
			nimln(156, "strtabs.nim");
			nimln(730, "system.nim");
			if (!!(((flags &(1<<((((NU8) 1))&7)))!=0))) goto LA21;
			nimln(156, "strtabs.nim");
			raiseformatexception_112955(key);		}		goto LA15;
		LA21: ;
		LA15: ;
	}	LA13: ;
	BeforeRet: ;	popFrame();
	return result;
}N_NIMCALL(void, TMP298)(void* p, NI op) {
开发者ID:rbehrends,项目名称:csources,代码行数:60,代码来源:pure_strtabs.c

示例12: splitByChar

/**
* function splitByChar(SLIST *strList, struct String *src, char c, int start)
* 
* Purpose: Helper function to split a string into a list of strings 
* based on a char. Note: strings are added in alphabetical order to strList.
**/
int splitByChar(SLIST *strList, struct String *src, char c, int start)
{
	int i = start;
	int retval = -1;
	struct String *newStr;
	newStr = createStr(); //Allocate and initialize newStr
	
	//Iterate through src->buf
	while (i < src->strLen)
	{
		if (src->buf[i] == c) 
		{
			//appendChar(newStr, 0);
			retval = i + 1;
			break;
		}
		else
		{
			appendChar(newStr, src->buf[i]);
			i++;
		}
	}

	//Empty String
	if ((newStr->buf[0] == '\0'))
		destroyStr(newStr);
	else if(start == i)
		destroyStr(newStr);
	//non-empty string, add to list
	else
		addStr(strList, newStr);
	
	return retval;
}
开发者ID:lorenzoespares,项目名称:portfolio,代码行数:40,代码来源:stringlist.c

示例13: N_NIMCALL

N_NIMCALL(void, Commandgendepend_191410)(NimStringDesc* Filename_191412) {
TY105006 LOC1;
TY105006 LOC2;
NimStringDesc* LOC3;
NimStringDesc* LOC4;
NimStringDesc* LOC5;
Semanticpasses_191408();
LOC1 = Gendependpass_187004();
Registerpass_105028(&LOC1);
LOC2 = Cleanuppass_186161();
Registerpass_105028(&LOC2);
Compileproject_191405(Filename_191412);
Generatedot_187006(Filename_191412);
LOC3 = 0;
LOC4 = 0;
LOC4 = nosChangeFileExt(Filename_191412, ((NimStringDesc*) &TMP197496));
LOC5 = 0;
LOC5 = nosChangeFileExt(Filename_191412, ((NimStringDesc*) &TMP197497));
LOC3 = rawNewString(LOC4->Sup.len + LOC5->Sup.len + 13);
appendString(LOC3, ((NimStringDesc*) &TMP197495));
appendString(LOC3, LOC4);
appendChar(LOC3, 32);
appendString(LOC3, LOC5);
Execexternalprogram_70570(LOC3);
}
开发者ID:ddlsmurf,项目名称:Nimrod,代码行数:25,代码来源:main.c

示例14: N_NIMCALL

N_NIMCALL(NimStringDesc*, normExt_3yxSdoh5oykvpUqYYeaz2g)(NimStringDesc* ext) {
	NimStringDesc* result;
	result = (NimStringDesc*)0;
	{
		NIM_BOOL T3_;
		T3_ = (NIM_BOOL)0;
		T3_ = ((ext) && (ext)->Sup.len == 0);
		if (T3_) goto LA4_;
		T3_ = ((NU8)(ext->data[((NI) 0)]) == (NU8)(46));
		LA4_: ;
		if (!T3_) goto LA5_;
		result = copyString(ext);
	}
	goto LA1_;
	LA5_: ;
	{
		NimStringDesc* T8_;
		T8_ = (NimStringDesc*)0;
		T8_ = rawNewString(ext->Sup.len + 1);
appendChar(T8_, 46);
appendString(T8_, ext);
		result = T8_;
	}
	LA1_: ;
	return result;
}
开发者ID:nim-lang,项目名称:csources,代码行数:26,代码来源:stdlib_ospaths.c

示例15: localExtract

int localExtract(char *fInput, SLIST *wordList)
{
	FILE *fp;
	char c;
	struct String *buffer = createStr();
	
	//Attempt to open file 
	fp = fopen(fInput, "r");
	if (fp == NULL)
	{
		printf("Unable to open file: %s\n", fInput);
		return -1;
	}
	while((c = fgetc(fp)) != EOF)
		appendChar(buffer, c);
		
	fclose(fp);
	
	//Truncate and clean string to be ready for parsing
	truncateStr(buffer);
	charSplit(wordList, buffer, ' ');
	rmStopWords(wordList);
	
	destroyStr(buffer); //free allocated memory
	return 0;
}
开发者ID:lorenzoespares,项目名称:portfolio,代码行数:26,代码来源:extraction.c


注:本文中的appendChar函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。