1. 基础字符串函数:
字符串库中有一些函数非常简单,如:
1). string.len(s) 返回字符串s的长度;
2). string.rep(s,n) 返回字符串s重复n次的结果;
3). string.lower(s) 返回s的副本,其中所有的大写都被...
分类:
其他好文 时间:
2014-11-26 20:39:02
阅读次数:
203
Given an array of strings, return all groups of strings that are anagrams.Note: All inputs will be in lower-case.参考:http://www.cnblogs.com/AnnieKim/ar...
分类:
其他好文 时间:
2014-11-26 01:08:54
阅读次数:
190
这个题目很简单,给一个字符串,然后返回最后一个单词的长度就行。题目如下: Given a string s consists of upper/lower-case alphabets and empty space characters ' ', return the length of last...
分类:
其他好文 时间:
2014-11-26 01:07:58
阅读次数:
218
Given an array of strings, return all groups of strings that are anagrams.
Note: All inputs will be in lower-case.
思路:对每一个单词的所有字母按照字典顺序排序,排序结果作为key,所有具有相同key的单词组合在一起成为一个Anagram group。最后返回所有的Anag...
分类:
其他好文 时间:
2014-11-25 23:42:35
阅读次数:
195
lower_bound它有三个参数, 第一个和第二个是给定区间起点和终点的指针,第三个参数是要查找的数,它的作用原理是在给定的区间中进行二分查找,这个二分区间是前开后闭的,他返回第一个大于等于它的函数指针,例如数组a[100] = {3, 4, 5, 6, 7, 10, 12, 34, 55}; 想...
分类:
其他好文 时间:
2014-11-25 23:09:10
阅读次数:
212
Given a string s consists of upper/lower-case alphabets and empty space characters '
', return the length of last word in the string.
If the last word does not exist, return 0.
Note: A word is...
分类:
其他好文 时间:
2014-11-24 19:21:31
阅读次数:
162
本文整理和介绍了STL中有序集合的lower_bound、upper_bound以及equal_range的功能及使用,梳理下相关知识。
分类:
其他好文 时间:
2014-11-23 21:38:32
阅读次数:
205
函数分类oraclehive说明字符函数upper('coolszy')upper(stringA)ucase(stringA)将文本字符串转换成字母全部大写形式lower('KUKA')lower(stringA)lcase(stringA)将文本字符串转换成字母全部小写形式initca...
分类:
其他好文 时间:
2014-11-22 17:22:00
阅读次数:
407
VS开发C#程序时TextBox的属性中有个Charactercasing属性:默认为normal,把它改为Upper,这样无论你输入的是大写还是小写,在文本框中显示出的都是大写,如果改为Lower的话就是小写.还可以使用如下方法实现:1 private void textBox1_KeyPress...
插件代码
接口类头文件 MyPluginInterface.h
#ifndef INTERFACES_H
#define INTERFACES_H
#include
#define QtPluginDemo_iid "org.qt-project.Qt.PluginDemo"
class MyPluginInterface
{
public:
virtual int add(int,...