码迷,mamicode.com
首页 >  
搜索关键字:str1    ( 1981个结果
查找两个字符串a,b中的最长公共子串
import java.util.Scanner; public class GetCommonStr { public static void main(String[] args) { Scanner scan = new Scanner(System.in); String str1 = scan.nextLine(); String str2 = scan.nextLi...
分类:其他好文   时间:2015-08-19 23:49:10    阅读次数:188
字符串常用函数汇总【持续更新中........】
以下函数包含在头文件string.h中1、strlen函数:作用:计算字符串长度返回值为字符串的长度使用:设len为所要求的字符串长度,str[MAX];为所要求的字符串则len=strlen(str);2、strcpy函数:作用:将一个字符串拷贝下来,复制给另一个字符串使用:设两个字符串为str1...
分类:其他好文   时间:2015-08-19 19:53:33    阅读次数:161
以一个小例子来说明 == 与 equals() 的区别
public class StringAndStringBuffer {public static void main(String[] args) { String str1="hello"; String str2="he"+"llo";String str3="he"+new String("...
分类:其他好文   时间:2015-08-19 19:44:37    阅读次数:126
公共字串计算
import java.util.Arrays; import java.util.Scanner; public class GetCommonString { public static void main(String[] args) { Scanner scan = new Scanner(System.in); String str1 = scan.next().toLo...
分类:其他好文   时间:2015-08-19 00:45:18    阅读次数:135
python 数据类型 序列——列表
python 数据类型 序列——列表**列表** list是处理一组有序项目的数据结构,即你可以在一个列表中存储一个序列的项目。 列表是可变类型的数据。 用[]表示列表,包含了多个以逗号分割开的数字或者字符串。 >>> list1 = ['1','chen','陈'] >>> list2 = [1,2,3,4] >>> list3 = ["str1","str1","22"] >>> list4 =...
分类:编程语言   时间:2015-08-18 22:51:29    阅读次数:208
Hdu oj 2112 HDU Today
题目:点击打开链接 关于C++中map的使用:点击打开链接 代码: #include #include #include #include//将字符串转化成数字 #include #define INF 0x3f3f3f3f using namespace std; char str1[30],str2[30]; int cost[150][150],d[150]; bo...
分类:其他好文   时间:2015-08-18 19:38:25    阅读次数:147
UIWebView复习
UIWebView中网页和客户端方法互相调用很重要 1.js调用oc 网页部分function testClick(cmd) { var str1="ios"; window.location.href="ios://"+cmd+":/"+str1; }- (BOOL)web...
分类:Web程序   时间:2015-08-18 18:19:10    阅读次数:134
object_c函数多个返回值
- (void)readStr1:(NSString**)str1 andStr2:(NSString**)str2{NSString *s1 = @"1";NSString *S2 = @"2";*str1 = [s1 copy];*str2 = [S2 copy];}//下面是调用方法:NSSt...
分类:其他好文   时间:2015-08-18 16:00:10    阅读次数:106
oc字符串的用法
#import #import "AppDelegate.h"int main(int argc, char * argv[]) { NSString *str=@"Hello OC";//普通字符定义 NSString *str1=[NSString stringWithFormat:...
分类:其他好文   时间:2015-08-18 15:48:00    阅读次数:94
关于Calendar中设置月份比实际小1的问题
有如下程序,转化两个字符串数字为date类型,并判断是历史上的星期几,是否同为星期一代码如下:public static void main(String[] args) throws ParseException { //方法一: String str1="2001-12-05"; Str...
分类:其他好文   时间:2015-08-18 13:50:10    阅读次数:170
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!