• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ AsString函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: MakeInvocation

static 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,代码来源:main.cpp


示例2: AsString

mf::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,代码来源:v1_1.cpp


示例3: switch

String 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,代码来源:ParaData.cpp


示例4: AddFontResourceExW

void    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,代码来源:plWinFontCache.cpp


示例5: Clear

void 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,代码来源:cfg.cpp


示例6: AsString

void 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,代码来源:invoicelist.cpp


示例7: return

Value 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,代码来源:Exe.cpp


示例8: AsString

void 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,代码来源:invoice.cpp


示例9: GetVolumeSn

String GetVolumeSn(const String &vol, int len) {
	dword sn;
	
	// Win API
	if(!GetVolumeInformation(vol, NULL, 0, &sn, NULL, NULL, NULL, 0)) sn = 71511731;
#ifdef _WITH_DEBUG
RLOG("GetVolumeSn():sn = " + AsString(sn));
#endif	
	
	return String(AsString(sn)).Right(len);
}
开发者ID:dreamsxin,项目名称:ultimatepp,代码行数:11,代码来源:utils.cpp


示例10: AsString

mf::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,代码来源:v1_3.cpp


示例11: AsString

void 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,代码来源:FindInFiles.cpp


示例12: AsString

mf::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,代码来源:v0.cpp


示例13: AsString

mf::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,代码来源:v1_1.cpp


示例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,代码来源:main.cpp


示例15: AsString

mf::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,代码来源:v1_3.cpp


示例16: switch

const 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,代码来源:KVDatime.cpp


示例17: switch

const 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,代码来源:xpvalue.cpp


示例18: Format

std::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,代码来源:DataType.cpp


示例19: assert

std::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,代码来源:v1_3.cpp


示例20: GetDirect

FX_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,代码来源:fpdf_parser_objects.cpp



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ AsciiStrLen函数代码示例发布时间:2022-05-30
下一篇:
C++ AsShared函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap