S.find()#可指定范围查找字串,返回索引值,否则返回-1S.index()#同find,只是找不到的之后返回异常S.count()#返回找到字串的个数S.lower()#转小写S.capitalize()#首字母大写S.upper()#转大写S.swapcase()#大小写互换S.split(...
分类:
编程语言 时间:
2015-04-28 17:27:16
阅读次数:
171
STL中的二分查找——lower_bound 、upper_bound 、binary_search 二分查找很简单,原理就不说了。STL中关于二分查找的函数有三个lower_bound 、upper_bound 、binary_search 。这三个函数都运用于有序区间(当然这也是运用二分查找的前...
分类:
其他好文 时间:
2015-04-28 15:34:17
阅读次数:
222
1.num=num+(lower_bound(a+i+1,a+n,a[i]+mid)-(a+i+1));与num=num+lower_bound(a+i+1,a+n,a[i]+mid)-(a+i+1);在此我深刻践踏自己的傻逼行为,我tm当时为什么不用屁股想想num+lower_bound(a+i+...
分类:
其他好文 时间:
2015-04-28 01:51:43
阅读次数:
127
Title:Given a stringsconsists of upper/lower-case alphabets and empty space characters' ', return the length of last word in the string.If the last wo...
分类:
其他好文 时间:
2015-04-27 12:52:47
阅读次数:
139
----处理字符串select LEFT('abcdef',2) --从左往右select right('abcdef',2) --从右往左select lower('AVc') -- 转化为小写select upper('adsdf')--转化为大写print upper('adsdf')--转化...
分类:
数据库 时间:
2015-04-25 10:34:03
阅读次数:
133
变量调节器:前者的输入是后者的输出 也就是函数使用 变量这里做为 函数的参数 输出的是执行后的结果 函数实例(变量调节器) {$name}{$name|lower} {*把变量字符串转换为小写*}{$name|upper} {*大写转换*}{$content}{$content...
分类:
系统相关 时间:
2015-04-24 18:50:41
阅读次数:
299
一.字符串函数select concat(name,"age is",age) from users;insert(str,x,y,insert)//将字符串x位置开始y个位置替换成insertselect lower(str) upper(str)//转化大小写select * from user...
分类:
数据库 时间:
2015-04-23 19:34:03
阅读次数:
223
--查看alert日志所在目录selectvaluefromv$diag_infowherename=‘DiagTrace‘;VALUE---------------------------------------------------/home/oracle/app/oracle/diag/rdbms/ecom/ecom/trace--查到alert文件的名称(alert文件命名原则:alert_dbname.log)select‘alert_‘||lower..
分类:
其他好文 时间:
2015-04-19 19:45:01
阅读次数:
181
STL里,这两个函数用于在有序的数组里找某个元素的位置,用法简单提一下upper_bound(begin,end,key),start是查找的起点,end是终点,key是关键值,lower_bound()用法一样,upper_bound()函数,返回第一个大于要找的值得位置(或者理解是这个元素的下一个位置),而Lower_bound是小于等于关键字的位置(或者理解为关键字第一次出现 的位置),
...
分类:
其他好文 时间:
2015-04-19 19:33:04
阅读次数:
126
1、去空格函数(1)、LTRIM() 把字符串头部的空格去掉。(2)、RTRIM() 把字符串尾部的空格去掉。2、大小写转换(1)LOWER()将字符串全部转为小写。(2)UPPER()将字符串全部转为大写。3、返回从字符串左边第starting_ position 个字符起length个字符的部分...
分类:
数据库 时间:
2015-04-19 17:39:59
阅读次数:
170