本文整理汇总了C++中StringCopy函数的典型用法代码示例。如果您正苦于以下问题:C++ StringCopy函数的具体用法?C++ StringCopy怎么用?C++ StringCopy使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了StringCopy函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ScrCmd_bufferfirstpoke
bool8 ScrCmd_bufferfirstpoke(struct ScriptContext *ctx)
{
u8 stringVarIndex = ScriptReadByte(ctx);
u8 *dest = gUnknown_083762F0[stringVarIndex];
u8 partyIndex = GetLeadMonIndex();
u32 species = GetMonData(&gPlayerParty[partyIndex], MON_DATA_SPECIES, NULL);
StringCopy(dest, gSpeciesNames[species]);
return FALSE;
}
示例2: HoroscopeExtractFromUDF
DefinitionModel* HoroscopeExtractFromUDF(const UniversalDataFormat& udf, char_t*& date)
{
DefinitionModel* model = new_nt DefinitionModel();
if (NULL == model)
return NULL;
ulong_t size = udf.getItemsCount();
for (ulong_t i=0; i < size; i++)
{
const char* type = udf.getItemData(i, 0);
if (StrEquals(horoscopeTitle, type))
{
TXT(udf.getItemText(i, 1));
model->last()->setStyle(StyleGetStaticStyle(styleNameBold));
model->last()->setJustification(DefinitionElement::justifyCenter);
}
else if (StrEquals(horoscopeText, type))
{
LBR();
TXT(udf.getItemText(i, 1));
}
else if (StrEquals(horoscopeSection, type))
{
LBR();
LBR();
TXT(udf.getItemText(i, 1));
model->last()->setStyle(StyleGetStaticStyle(styleNameBold));
}
else if (StrEquals(horoscopeSmallSection, type))
{
LBR();
TXT(udf.getItemText(i, 1));
model->last()->setStyle(StyleGetStaticStyle(styleNameBold));
}
else if (StrEquals(horoscopeDate, type))
{
char_t* d = StringCopy(udf.getItemText(i, 1));
free(date);
date = d;
if (NULL == date)
goto Error;
}
else if (StrEquals(horoscopeUrlLink, type))
{
LBR();
TXT(udf.getItemText(i, 1));
model->last()->setActionCallback(HoroscopesLinkCallback, (void*)udf.getItemData(i, 2));
model->last()->setHyperlink("", hyperlinkCallback);
}
else
goto Error;
}
return model;
Error:
delete model;
return NULL;
}
示例3: CREATE
RptField *RptFieldCreate(char *s, int just)
{
RptField *rf;
rf = CREATE(RptField);
rf->s = StringCopy(s, "RptFieldCreate");
rf->just = just;
rf->next = NULL;
return(rf);
}
示例4: ScrCmd_vbuffer
bool8 ScrCmd_vbuffer(struct ScriptContext *ctx)
{
u8 stringVarIndex = ScriptReadByte(ctx);
u32 addr = ScriptReadWord(ctx);
u8 *src = (u8 *)(addr - gUnknown_0202E8B0);
u8 *dest = gUnknown_083762F0[stringVarIndex];
StringCopy(dest, src);
return FALSE;
}
示例5: ResetRtcScreen_PrintTime
void ResetRtcScreen_PrintTime(u8 x, u8 y, u16 days, u8 hours, u8 minutes, u8 seconds)
{
u8 *dest = gStringVar4;
days %= 10000;
hours %= 24;
minutes %= 60;
seconds %= 60;
AlignInt2InMenuWindow(gStringVar1, days, 24, 1);
dest = StringCopy(dest, gStringVar1);
dest = StringCopy(dest, gOtherText_Day);
AlignInt2InMenuWindow(gStringVar1, hours, 18, 1);
dest = StringCopy(dest, gStringVar1);
dest = StringCopy(dest, gUnknown_08376500);
dest = ConvertIntToDecimalStringN(dest, minutes, STR_CONV_MODE_LEADING_ZEROS, 2);
dest = StringCopy(dest, gUnknown_08376500);
ConvertIntToDecimalStringN(dest, seconds, STR_CONV_MODE_LEADING_ZEROS, 2);
Menu_PrintText(gStringVar4, x, y);
}
示例6: sprintf
bool StructuredSVM::SaveTrainingSet(int start_from) {
if(!trainfile && modelfile) {
char tmp[1000];
sprintf(tmp, "%s.train", modelfile);
trainfile = StringCopy(tmp);
}
if(trainfile) return SaveDataset(trainset, trainfile, start_from);
return false;
}
示例7: FloatToString
char * FloatToString(Float value)
{
std::ostringstream oss;
if ((oss << value) == false)
{
return "";
}
return StringCopy(oss.str().c_str());
}
示例8: CCOMString
CCOMString CCOMString::Left(int nCount)
{
if (nCount < 0)
nCount = 0;
if (nCount >= GetLength())
return CCOMString(*this);
CCOMString newStr;
StringCopy(newStr, nCount, 0, 0);
return newStr;
}
示例9: CCOMStringW
CCOMStringW CCOMStringW::Right(int nCount)
{
if (nCount < 0)
nCount = 0;
if (nCount >= GetLength())
return CCOMStringW(*this);
CCOMStringW newStr;
StringCopy(newStr, nCount, GetLength() - nCount, 0);
return newStr;
}
示例10: StringInit
CMyNumString::CMyNumString(const char *psz)
{
StringInit();
if (!CheckNum(psz))
{
return;
}
StringCopy(psz);
}
示例11: ProjectInit
rc_t ProjectInit ( Project* self, uint32_t p_id, const String* name, const String* download_ticket, const String* encryption_key )
{
rc_t rc = 0;
memset(self, 0, sizeof(Project));
self->id = p_id;
rc = StringCopy((const String**)&self->name, name);
if (rc == 0)
{
rc = StringCopy((const String**)&self->download_ticket, download_ticket);
if (rc == 0)
{
rc = StringCopy((const String**)&self->encryption_key, encryption_key);
if (rc != 0)
StringWhack(self->download_ticket);
}
else
StringWhack(self->name);
}
return rc;
}
示例12: StringCopy
void StructuredSVM::LoadTrainset(const char *fname) {
if(trainfile) free(trainfile);
trainfile = StringCopy(fname);
trainset = LoadDataset(fname);
if(!trainset) {
fprintf(stderr, "Failed to load trainset %s\n", fname);
assert(trainset != NULL);
exit(0);
}
}
示例13: func_22
struct<6> func_22()
{
char[24] cVar0;
StringCopy(&cVar0, "NULL", 24);
if (Global_15712 == 4)
{
return Global_15331;
}
return cVar0;
}
示例14: test_StringCopy
void test_StringCopy()
{
char *src = "normal string";
char dest[128];
I32 result = StringCopy(dest, 128, src, 0);
ERROR(result == 13);
ERROR(StringCompare(dest, src) == 0);
result = StringCopy(dest, 128, src, 6);
ERROR(result == 6);
ERROR(StringCompare(dest, "normal") == 0);
result = StringCopy(dest, 3, src, 128);
ERROR(result == 2);
ERROR(StringCompare(dest, "no") == 0);
result = StringCopy(dest, 128, "", 128);
ERROR(result == 0);
ERROR(StringCompare(dest, "") == 0);
}
示例15: cDecodePgn129809
void cDecodePgn129809(const tNmea2KMsg *msg, void* pData)
{
tcPgn129809Data *pDecodeData = (tcPgn129809Data*)pData;
pDecodeData->MessageId = msg->data[0] & 0x3F;
pDecodeData->RepeatIndicator = (msg->data[0] >> 6) & 0x03;
ULongIn(pDecodeData->UserId, msg->data + 1 );
StringCopy(pDecodeData->Name, (char*)(msg->data + 5), PGN129809_NAME_LENGTH_BYTES + 1); // + 0-termination
pDecodeData->AisTranceiverInformation = msg->data[25] & 0x1F;
}