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


C++ wstring::front方法代码示例

本文整理汇总了C++中std::wstring::front方法的典型用法代码示例。如果您正苦于以下问题:C++ wstring::front方法的具体用法?C++ wstring::front怎么用?C++ wstring::front使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在std::wstring的用法示例。


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

示例1: SetPlaceDistributionPolicy

void Service::SetPlaceDistributionPolicy(std::wstring const& distPolicy)
{
    if (distPolicy.front() == L'N' || distPolicy.front() == L'n')
    {
        this->partiallyPlace_ = false;
    }
    else
    {
        this->partiallyPlace_ = true;
    }
}
开发者ID:vturecek,项目名称:Service-Fabric,代码行数:11,代码来源:Service.cpp

示例2:

PictureElement(sf::Texture& texture, sf::IntRect textureSectionRect,
		int index, std::wstring word, sf::Vector2f pos )
    : missed_(false)
    , revealed_(false)
    , active_(false)
    , index_(index)
    , word_(word)
    , nextLetter_(word.front())
    //, scheduler_(sf::seconds(3.f), []() {  })
{
    const int charFontSize {22};
    const int charWidth {14};
    const int charHeight {24};

    sprite_.setTexture(texture);
    sprite_.setTextureRect(textureSectionRect);
    sprite_.setPosition(pos);

    wordText_.setFont(framework::ResourceHolder::get().fonts.get("arial"));
    wordText_.setPosition(sf::Vector2f(
    						pos.x + sprite_.getTextureRect().width / 2.f ,
							pos.y + sprite_.getTextureRect().height/ 2.f));
    wordText_.setString(word);
    wordText_.setCharacterSize(charFontSize);
    //wordText_.setColor(sf::Color::White);
    wordText_.setStyle(sf::Text::Bold);
    wordText_.setOrigin(0, 0);

    //timer_.restart();
    
    //shape.setSize(sf::Vector2f(word.length() * charWidth, charHeight));

    LOG_INFO("PictureElement:" << word_);
}
开发者ID:kubatrt,项目名称:KeyboardMaster,代码行数:34,代码来源:PictureElement.hpp

示例3: RangeFromString

ItRange<uint16_t*> RangeFromString(std::wstring& str) {
  auto s = reinterpret_cast<uint16_t*>(&str.front());
  return ItRange<uint16_t*>(s, s + str.size());
}
开发者ID:cpizano,项目名称:CamCenter,代码行数:4,代码来源:stdafx.cpp


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