这篇教程C++ AsString函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中AsString函数的典型用法代码示例。如果您正苦于以下问题:C++ AsString函数的具体用法?C++ AsString怎么用?C++ AsString使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了AsString函数的28个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: MakeInvocationstatic FObject MakeInvocation(int argc, FChS * argv[]){ uint_t sl = -1; for (int adx = 0; adx < argc; adx++) sl += StringLengthS(argv[adx]) + 1; FObject s = MakeString(0, sl); uint_t sdx = 0; for (int adx = 0; adx < argc; adx++) { sl = StringLengthS(argv[adx]); for (uint_t idx = 0; idx < sl; idx++) { AsString(s)->String[sdx] = argv[adx][idx]; sdx += 1; } if (adx + 1 < argc) { AsString(s)->String[sdx] = ' '; sdx += 1; } } return(s);}
开发者ID:beimprovised,项目名称:foment,代码行数:28,
示例2: AsStringmf::http::SharedBuffer::Pointer Impl::GetPostData(){ std::map<std::string, std::string> parts; if (quickkey_) parts["quick_key"] = *quickkey_; if (get_counts_only_) parts["get_counts_only"] = AsString(*get_counts_only_); if (duration_minutes_) parts["duration"] = AsString(*duration_minutes_); if (nofify_owner_on_access_) parts["email_notification"] = AsString(*nofify_owner_on_access_); if (success_callback_url_) parts["success_callback_url"] = *success_callback_url_; if (error_callback_url_) parts["error_callback_url"] = *error_callback_url_; if (bind_ip_) parts["bind_ip"] = *bind_ip_; if (burn_after_use_) parts["burn_after_use"] = AsString(*burn_after_use_); std::string post_data = MakePost(api_path + ".php", parts); AddDebugText(" POST data: " + post_data + "/n"); return mf::http::SharedBuffer::Create(post_data);}
开发者ID:MediaFire,项目名称:mediafire-cpp-sdk,代码行数:25,
示例3: switchString RichPara::Number::AsText(const RichPara::NumberFormat& format) const{ String result; for(int i = 0; i < 8; i++) if(format.number[i]) { if(result.GetLength()) result.Cat('.'); int q = n[i]; switch(format.number[i]) { case NUMBER_1: result << AsString(q); break; case NUMBER_0: result << AsString(q - 1); break; case NUMBER_a: result << FormatIntAlpha(q, false); break; case NUMBER_A: result << FormatIntAlpha(q, true); break; case NUMBER_i: result << FormatIntRoman(q, false); break; case NUMBER_I: result << FormatIntRoman(q, true); break; } } return format.before_number + result + format.after_number;}
开发者ID:pedia,项目名称:raidget,代码行数:31,
示例4: AddFontResourceExWvoid plWinFontCache::ILoadCustomFonts( void ){ if( fCustFontDir == nil ) return; // Iterate through all the custom fonts in our dir int numAdded; std::vector<plFileName> fonts = plFileSystem::ListDir(fCustFontDir, kCustFontExtension); for (auto iter = fonts.begin(); iter != fonts.end(); ++iter) { // Note that this call can be translated as "does my OS suck?"#if (_WIN32_WINNT >= 0x0500) if( plDynSurfaceWriter::CanHandleLotsOfThem() ) numAdded = AddFontResourceExW(iter->AsString().ToWchar(), FR_PRIVATE, 0); else#endif numAdded = AddFontResourceW(iter->AsString().ToWchar()); if( numAdded > 0 ) { plStatusLog::AddLineS( "pipeline.log", "WinFontCache: Added custom font %s, %d fonts", iter->GetFileName().c_str(), numAdded ); fCustFonts.Append(new plCustFont(*iter)); } else { plStatusLog::AddLineS( "pipeline.log", "WinFontCache: Unable to load custom font %s", iter->GetFileName().c_str() ); } }}
开发者ID:Asteral,项目名称:Plasma,代码行数:30,
示例5: Clearvoid defList::Load(String filePath){ Clear() ; path = filePath ; name = GetFileTitle(path) ; VectorMap<String,String> ini = LoadIniFile(path) ; fields = Split(ini.Get("fields", ""), ',' ) ; CSVParser csv ; for( int i=0; true; i++) { String s = ini.Get("data_" + AsString(i), "") ; if (s.IsEmpty()) break ; data.Add(csv.ParseLine(s, fields.GetCount()) ) ; } for (int i=0; true; i++) { String s = ini.Get("error_" + AsString(i), "") ; if (s.IsEmpty()) break ; errors.Add(s) ; } // guardamos este como último cargado theCfg.lastList = path ; theCfg.Save() ;}
开发者ID:dreamsxin,项目名称:ultimatepp,代码行数:33,
示例6: AsStringvoid InvoiceList::formatHeader(StringBuffer &buf){ buf.Cat("{{1:1~ "); buf.Cat("[*A3 " + AsString(t_("Invoice list")) + "] :: [*A3 ]:: "); buf.Cat("[A1 " + AsString(t_("Date from:")) + "-|" + AsString(from)); buf.Cat("&" + AsString(t_("Date to:")) + "-|" + AsString(to)); buf.Cat("]:: "); buf.Cat("}}");}
开发者ID:jkusniar,项目名称:tara,代码行数:9,
示例7: returnValue Compiler::ExeNeq::Eval(ExeContext& x) const{ Value v1 = a->Eval(x); Value v2 = b->Eval(x); if(IsString(v1) && IsString(v2)) return (String)v1 != (String)v2; if(IsNumber(v1) && IsNumber(v2)) return (double)v1 != (double)v2; return AsString(v1) != AsString(v2);}
开发者ID:AbdelghaniDr,项目名称:mirror,代码行数:10,
示例8: AsStringvoid InvoiceFormatter::formatHeader(StringBuffer &buf, InvoiceData &invoice) { buf.Cat("{{1:1~ "); buf.Cat("[*A3 " + AsString(t_("Invoice")) + "] :: [*A3 " + AsString(t_("invoice num:")) + " " + AsString(invoice.inv_id) + "]:: "); buf.Cat("[A1 " + AsString(t_("Create date:")) + "-|-|-|" + AsString(invoice.create_date)); if (lang != LANG_CZ) { buf.Cat("&" + AsString(t_("Delivery date:")) + "-|-|" + AsString(invoice.delivery_date) + "&"); buf.Cat(AsString(t_("Payment date:")) + "-|-|-|" + AsString(invoice.payment_date) ); } buf.Cat("]:: "); // no payment type in CZ if (lang != LANG_CZ) { String type; switch (invoice.payment_type) { case iptCurrency: type = t_("currency"); break; case iptBankTransfer: type = t_("bank transfer"); break; default: type = t_("currency"); } buf.Cat("[A1 " + AsString(t_("Payment type:")) + "-|-|" + type + "]&"); } buf.Cat("}}");}
开发者ID:jkusniar,项目名称:tara,代码行数:30,
示例9: GetVolumeSnString GetVolumeSn(const String &vol, int len) { dword sn; // Win API if(!GetVolumeInformation(vol, NULL, 0, &sn, NULL, NULL, NULL, 0)) sn = 71511731;#ifdef _WITH_DEBUGRLOG("GetVolumeSn():sn = " + AsString(sn));#endif return String(AsString(sn)).Right(len);}
开发者ID:dreamsxin,项目名称:ultimatepp,代码行数:11,
示例10: AsStringmf::http::SharedBuffer::Pointer Impl::GetPostData(){ std::map<std::string, std::string> parts; parts["quick_key"] = AsString(quickkeys_); if (link_types_) parts["link_type"] = AsString(*link_types_); std::string post_data = MakePost(api_path + ".php", parts); AddDebugText(" POST data: " + post_data + "/n"); return mf::http::SharedBuffer::Create(post_data);}
开发者ID:herbertjones,项目名称:mediafire-cpp-sdk,代码行数:12,
示例11: AsStringvoid Ide::AddFoundFile(const String& fn, int ln, const String& line, int pos, int count){ ErrorInfo f; f.file = fn; f.lineno = ln; f.linepos = 0; f.kind = 0; f.message = "/1" + EditorSyntax::GetSyntaxForFilename(fn) + "/1" + AsString(pos) + "/1" + AsString(count) + "/1" + line; ffound.Add(fn, ln, f.message, RawToValue(f)); ffound.Sync();}
开发者ID:ultimatepp,项目名称:mirror,代码行数:12,
示例12: AsStringmf::http::SharedBuffer::Pointer Impl::GetPostData(){ std::map<std::string, std::string> parts; parts["quick_key"] = quickkey_; parts["source_revision"] = AsString(source_revision_); parts["target_revision"] = AsString(target_revision_); std::string post_data = MakePost(api_path + ".php", parts); AddDebugText(" POST data: " + post_data + "/n"); return mf::http::SharedBuffer::Create(post_data);}
开发者ID:dazw666,项目名称:mediafire-cpp-sdk,代码行数:12,
示例13: AsStringmf::http::SharedBuffer::Pointer Impl::GetPostData(){ std::map<std::string, std::string> parts; if (product_id_) parts["product_id"] = AsString(*product_id_); if (family_) parts["family"] = AsString(*family_); std::string post_data = MakePost(api_path + ".php", parts); AddDebugText(" POST data: " + post_data + "/n"); return mf::http::SharedBuffer::Create(post_data);}
开发者ID:herbertjones,项目名称:mediafire-cpp-sdk,代码行数:13,
示例14: Format//Вывод в файл список в формате Оригинал - Русское - количество эпизодовvoid AnimeList::PrintFile(){ if(!fs.ExecuteSaveAs()) return; String printfile = fs; String xml, name, namerus, episodes; for(int i = 0; i < listName.GetCount(); i++) { xml += Format(AsString(listName.Get(i, Named)) + " - " + AsString(listName.Get(i, NamedRus)) + " - Episodes: %d", listName.Get(i, Episodes)); RawCat(xml, "/r/n"); } if(!SaveFile(printfile, xml)) Exclamation("Error Saving the File");}
开发者ID:MagistrTot,项目名称:AnimeListOld,代码行数:16,
示例15: AsStringmf::http::SharedBuffer::Pointer Impl::GetPostData(){ std::map<std::string, std::string> parts; if (previous_file_versions_) parts["previous_file_versions"] = AsString(*previous_file_versions_); if (default_share_link_status_) parts["default_share_link_status"] = AsString(*default_share_link_status_); if (collect_metadata_) parts["collect_metadata"] = AsString(*collect_metadata_); std::string post_data = MakePost(api_path + ".php", parts); AddDebugText(" POST data: " + post_data + "/n"); return mf::http::SharedBuffer::Create(post_data);}
开发者ID:MediaFire,项目名称:mediafire-cpp-sdk,代码行数:15,
示例16: switchconst Char_t* KVDatime::String(EKVDateFormat fmt){ // Returns date & time as a string in required format: // fmt = kCTIME (default) : ctime format e.g. Thu Apr 10 10:48:34 2008 // fmt = kSQL : SQL format e.g. 1997-01-15 20:16:28 // fmt = kGANACQ : GANIL acquisition format e.g. 29-SEP-2005 09:42:17.00 // fmt = kDMY : DD/MM/YYYY switch(fmt){ case kCTIME: fStr = AsString(); break; case kSQL: fStr = AsSQLString(); break; case kGANACQ: fStr = AsGanacqDateString(); break; case kDMY: fStr = AsDMYDateString(); break; default: fStr = ""; } return fStr.Data();}
开发者ID:pwigg,项目名称:kaliveda,代码行数:25,
示例17: switchconst uni_char *XPath_Value::AsStringL (TempBuffer &buffer){ switch (type) { case XP_VALUE_NUMBER: return AsStringL (data.number, buffer); case XP_VALUE_BOOLEAN: return AsString (data.boolean); case XP_VALUE_STRING: return data.string; default: if (type == XP_VALUE_NODE && data.node == 0 || type == XP_VALUE_NODESET && data.nodeset->GetCount () == 0) return UNI_L (""); else { XPath_Node *node; if (type == XP_VALUE_NODESET) node = data.nodeset->Get (0); else node = data.node; node->GetStringValueL (buffer); return buffer.GetStorage () ? buffer.GetStorage () : UNI_L (""); } }}
开发者ID:prestocore,项目名称:browser,代码行数:31,
示例18: Formatstd::string DataType::toString() const{ if(m_CompositeDataType == CompositeDataType_None) return Format("%s", AsString(m_PrimitiveDataType)); else return Format("%s%d%c", ToDefinitionString(m_CompositeDataType), m_CompositeSize, ToDefinitionChar(m_PrimitiveDataType));}
开发者ID:henry4k,项目名称:sparkplug-gl,代码行数:7,
示例19: assertstd::string v1_3::Request::Url(std::string hostname) const{ std::map<std::string, std::string> query_parts; static const bool has_app_id = (app_constants::kAppId != nullptr && std::strlen(app_constants::kAppId) > 0); if (has_app_id) { query_parts.emplace(std::string("application_id"), app_constants::kAppId); } else { assert(!"app_constants::kAppId not defined!"); } query_parts.emplace(std::string("token_version"), AsString(token_version_)); query_parts.emplace(std::string("response_format"), std::string("json")); const std::map<std::string, std::string> credential_parts = boost::apply_visitor(CredentialsParts(), credentials_); query_parts.insert(credential_parts.begin(), credential_parts.end()); std::string url; url = "https://" + hostname + "/api/1.3/user/get_session_token.php"; url += AssembleQueryParts(query_parts); return url;}
开发者ID:herbertjones,项目名称:mediafire-cpp-sdk,代码行数:29,
示例20: GetDirectFX_BOOL CPDF_Object::IsIdentical(CPDF_Object* pOther) const { if (this == pOther) return TRUE; if (!pOther) return FALSE; if (pOther->m_Type != m_Type) { if (IsReference() && GetDirect()) return GetDirect()->IsIdentical(pOther); if (pOther->IsReference()) return IsIdentical(pOther->GetDirect()); return FALSE; } switch (m_Type) { case PDFOBJ_BOOLEAN: return AsBoolean()->Identical(pOther->AsBoolean()); case PDFOBJ_NUMBER: return AsNumber()->Identical(pOther->AsNumber()); case PDFOBJ_STRING: return AsString()->Identical(pOther->AsString()); case PDFOBJ_NAME: return AsName()->Identical(pOther->AsName()); case PDFOBJ_ARRAY: return AsArray()->Identical(pOther->AsArray()); case PDFOBJ_DICTIONARY: return AsDictionary()->Identical(pOther->AsDictionary()); case PDFOBJ_NULL: return TRUE; case PDFOBJ_STREAM: return AsStream()->Identical(pOther->AsStream()); case PDFOBJ_REFERENCE: return AsReference()->Identical(pOther->AsReference()); } return FALSE;}
开发者ID:primiano,项目名称:pdfium-merge,代码行数:34,
示例21: Formatvoid HeaderCtrl::LeftDown(Point p, dword keyflags) {#ifdef _DEBUG if(keyflags & K_CTRL) { String text; for(int i = 0; i < col.GetCount(); i++) text += Format(i ? " %d" : "%d", GetTabWidth(i)); WriteClipboardText(".ColumnWidths(/"" + text + "/");"); BeepExclamation(); }#endif split = GetSplit(p.x); if(IsNull(split)) return; SetCapture(); if(split >= 0) { colRect = GetTabRect(split); return; } li = pushi = -1 - split; col[pushi].WhenLeftClick();#ifdef _DEBUG if((keyflags & K_ALT) && pushi >= 0) WriteClipboardText(AsString(GetTabWidth(pushi)));#endif if(pushi >= 0) { if(!col[pushi].WhenAction) { pushi = -1; return; } colRect = GetTabRect(pushi); push = true; } Refresh();}
开发者ID:AbdelghaniDr,项目名称:mirror,代码行数:33,
示例22: computeconst_shared_ptr<Result> BinaryExpression::compute(const string& left, const std::uint8_t& right, yy::location left_position, yy::location right_position) const { std::uint8_t converted_right = right; return compute(left, *AsString(converted_right), left_position, right_position);}
开发者ID:cqcallaw,项目名称:newt,代码行数:7,
示例23: Encode64void PropertiesWindow::OnEndEdit(int mode){ if (_Item) { for (int i = 0; i < _Properties.GetCount(); ++i) { String param = _Properties.GetKey(i); if (param.Find("Color") >= 0) // if color found { Color r = _Properties[i].GetData(); _Item->Set(param, Encode64(StoreAsString(r))); continue; } String value = AsString(_Properties[i].GetData()); _Item->Set(param, value); } if (mode) { _Options.EndEdit(); _Options.ClearCursor(); _Item->Set("Type", _Headers.Get(0, 1)); Generate(_Item, _Index); } WhenChildZ.Execute(); }}
开发者ID:AbdelghaniDr,项目名称:mirror,代码行数:28,
示例24: AsStringvoidFitResult::SaveAs(const std::string& fileName_) const{ std::ofstream fs; fs.open(fileName_.c_str()); fs << AsString(); fs.close();}
开发者ID:BillyLiggins,项目名称:oxsx,代码行数:7,
示例25: StringReport& InvoiceFormatter::formatFullInvoice(InvoiceData& invoice) { output.Clear(); output.Header(String("[A0> ") + String(t_("Page")) + String(" $$P]")); StringBuffer buf; buf.Cat("{{1f4 "); formatHeader(buf, invoice); buf.Cat(":: "); formatCompanyData(buf); buf.Cat(":: "); formatClientData(buf, invoice); buf.Cat(":: "); formatPatientData(buf, invoice); buf.Cat(":: "); formatInvoiceItems(buf, invoice); buf.Cat("}}"); if (!AsString(invoice.payed_date).IsEmpty() && lang != LANG_CZ) { buf.Cat("&&&&"); buf.Cat("{{1f4 "); formatBillHeader(buf, invoice, false); buf.Cat(":: "); formatBillPrice(buf, invoice); buf.Cat("}}"); } output << ~buf; return output;}
开发者ID:jkusniar,项目名称:tara,代码行数:33,
示例26: AsStringmf::http::SharedBuffer::Pointer Impl::GetPostData(){ std::map<std::string, std::string> parts; parts["foldername"] = foldername_; if (parent_folderkey_) parts["parent_key"] = *parent_folderkey_; if (mtime_) parts["mtime"] = AsString(*mtime_); if (rename_on_name_collision_) parts["allow_duplicate_name"] = AsString(*rename_on_name_collision_); std::string post_data = MakePost(api_path + ".php", parts); AddDebugText(" POST data: " + post_data + "/n"); return mf::http::SharedBuffer::Create(post_data);}
开发者ID:herbertjones,项目名称:mediafire-cpp-sdk,代码行数:16,
示例27: ASSERTSqlSelect& SqlSelect::Limit(int limit) { ASSERT(text.StartsWith("select ")); String s = AsString(limit); text.Insert(6, SqlCode(MSSQL, " top " + s)()); text << SqlCode(MSSQL, "")(" limit " + s); return *this;}
开发者ID:guowei8412,项目名称:upp-mirror,代码行数:7,
示例28: ConvertToGLGLenum ConvertToGL( ShaderType type ){ switch(type) { case ShaderType_Vertex: return GL_VERTEX_SHADER; case ShaderType_Fragment: return GL_FRAGMENT_SHADER; case ShaderType_Geometry: return GL_GEOMETRY_SHADER;#ifdef GL_TESS_CONTROL_SHADER case ShaderType_TesselationControl: return GL_TESS_CONTROL_SHADER; case ShaderType_TesselationEvaluation: return GL_TESS_EVALUATION_SHADER;#endif#ifdef GL_COMPUTE_SHADER case ShaderType_Compute: return GL_COMPUTE_SHADER;#endif default: FatalError("%s shader type (%u) not available", AsString(type), type); return 0; }}
开发者ID:henry4k,项目名称:sparkplug-gl,代码行数:25,
注:本文中的AsString函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ AsciiStrLen函数代码示例 C++ AsShared函数代码示例 |