示例代码如下:

 #include <boost/algorithm/algorithm.hpp>
#include <iostream>
using namespace std;
#include <string> void TimerTest()
{
// 字符串大小写转换;
string strTemp = "asdQWEghhh";
string strTemp1 = strTemp;
string strTemp2 = strTemp;
string strTemp3 = strTemp;
boost::to_upper(strTemp);
boost::to_lower(strTemp1);
string strTemp4 = boost::to_upper_copy(strTemp2); // 返回值变成大写,参数不变;
string strTemp5 = boost::to_lower_copy(strTemp3); // 返回值变成小写,参数不变;
}

boost 字符串大小写转换的更多相关文章

  1. linux bash shell:最方便的字符串大小写转换(lowercase/uppercase conversion) (转)

    原文地址:https://blog.csdn.net/10km/article/details/83384145 关于字符串大小写转换,是写 linux 脚本经常干的事儿,所以总想找个方便的方法让我少 ...

  2. 【转】Python 字符串大小写转换

    转载自:python 中字符串大小写转换 一.pyhton字符串的大小写转换, 常用的有以下几种方法: 1.对字符串中所有字符(仅对字母有效)的大小写转换,有两个方法: print 'just to ...

  3. [Swift]字符串大小写转换,同时实现本地化或设置语言环境

    在NSString中提供了3种字符串大小写转换方式:1. 转换字符串大小写2. 转换字符串大小写,并实现本地化3. 转换字符串大小写,并设置语言环境. 一. 转换字符串大小写如果只是想单纯的将字符串进 ...

  4. python 字符串大小写转换(不能使用swapcase()方法)

    python 3字符串大小写转换 要求不能使用swapcase()方法 #!/usr/bin/env python # -*- coding:utf-8 -*- # Author:Hiuhung Wa ...

  5. java字符串大小写转换的两种方法

    转载自:飞扬青春sina blogjava字符串大小写转换的两种方法 import java.io..* public class convertToPrintString {          pu ...

  6. std::string 字符串大小写转换(转)

    该问题归结为std::transform函数的使用 函数原型 template < class InputIterator, class OutputIterator, class UnaryO ...

  7. php字符串大小写转换

    strtoupper().strtolower().ucfirst().ucfirst().ucwords().mb_strtoupper().mb_strtolower()和mb_convert_c ...

  8. python 字符串 大小写转换

    总结 capitalize() 首字母大写,其余全部小写 upper() 全转换成大写 lower() 全转换成小写 title() 标题首字大写,如"i love python" ...

  9. python 字符串 大小写转换 以及一系列字符串操作技巧

    总结 capitalize() 首字母大写,其余全部小写 upper() 全转换成大写 lower() 全转换成小写 title() 标题首字大写,如"i love python" ...

随机推荐

  1. Trip

    Trip 给出一个长度为n序列\(\{a_i\}\),长度为m的序列\(\{b_i\}\),求它们的不同lcs序列按字典序输出,\(n,m\leq 80\),lcs不超过1000个,字符为26个小写字 ...

  2. colormap 参数及对应色卡

    [参考] [1]matlab帮助文档

  3. jquery选择器中中>和空格的区别

    空格:$('parent childchild')表示获取parent下的所有的childchild节点 大于号:$('parent > childchild')表示获取parent下的所有下一 ...

  4. C++ 俄罗斯方块

    #include <iostream> #include <string.h> #include <stdlib.h> #include <time.h> ...

  5. 阿里云 Aliplayer高级功能介绍(二):缩略图

    基本介绍 Aliplayer提供了缩略图的功能,让用户在拖动进度条之前知道视频的内容,用户能够得到很好的播放体验,缩略图是显示在Controlbar的上面,并且包含当前的时间,阿里云的媒体处理服务提供 ...

  6. Linux unzip解压多个文件

    假设当前目录下有多个zip文件 data.zip invoices.zip pictures.zip visit.zip, 直接 unzip *.zip 等价于 unzip data.zip invo ...

  7. day 72 Django基础七之Ajax

    Django基础七之Ajax   本节目录 一 Ajax简介 二 Ajax使用 三 Ajax请求设置csrf_token 四 关于json 五 补充一个SweetAlert插件(了解) 六 同源策略与 ...

  8. Tomcat点击项目名称,加载一个action请求

    <meta http-equiv="refresh" content="0;url=index.action">

  9. 026_JDBC

    JDBC简介 JDBC(Java DataBase Connectivity,Java数据库连接)是一种用于执行SQL语句的Java API,可以为多种关系数据库提供统一访问,它由一组用Java语言编 ...

  10. JQ实现全选、全不选

    代码: <table class="table myTable table-hover"> <thead> <tr> <th> &l ...