2016-09-20 回顾 回顾:字符串、列表、字典的修改关于内存的情况 一、字符串 str1 = 'luotianshuai' str2 = str1 print id(str1) print id(str2) print ' ' str1 = 'shuaige' print id(str1) p ...
分类:
其他好文 时间:
2016-09-20 13:43:45
阅读次数:
98
C/C++函数,比较两个字符串 设这两个字符串为str1,str2, 若str1=str2,则返回零; 若str1<str2,则返回负数; 若str1>str2,则返回正数。 C/C++函数,比较两个字符串 设这两个字符串为str1,str2, 若str1=str2,则返回零; 若str1<str2 ...
分类:
其他好文 时间:
2016-09-19 10:12:04
阅读次数:
132
1、echo 比 print 快,并且使用echo的多重参数(指用逗号而不是句点)代替字符串连接,比如echo $str1,$str2。如果使用echo $str1.$str2 就会需要 PHP 引擎首先把所有的变量连接起来,然后在输出,而echo $str1,$str2,PHP 引擎就会按照循序输 ...
分类:
Web程序 时间:
2016-09-17 11:57:29
阅读次数:
166
str1 = " nice to \t \n meet you \t \n " str2 = "9999 nice to \t 9 \n meet you \t \n 99999999" 增 删 (1)删除字符串开头和末尾的空白字符 str1.strip() 注:空白符包括: 若干空格,tab键(\ ...
分类:
编程语言 时间:
2016-09-16 17:05:02
阅读次数:
190
String str=new String(); str="erty"; Scanner sc= new Scanner(System.in); System.out.println("请输入内容:"); String str1=sc.nextLine();//定义str1来接受客户输入的内容 in ...
分类:
编程语言 时间:
2016-09-16 00:18:30
阅读次数:
211
String String str ="abc"; (字符串常量) str = "def"; (指向新的字符串) String str1 =new String(“tom”); String str2 =str1; str1 =“rose”; (把新的字符串地址赋给str1) 输出结果 char[] ...
分类:
其他好文 时间:
2016-09-14 18:35:37
阅读次数:
110
一、CONCAT(str1,str2,…) 返回结果为连接参数产生的字符串。如有任何一个参数为NULL ,则返回值为 NULL。 select concat(s_id, "--", s_bar_code) from `t_storage_order_detail` WHERE `s_sn` LIKE ...
分类:
数据库 时间:
2016-09-14 12:43:15
阅读次数:
229
strstr(str1,str2) 函数用于判断字符串str2是否是str1的子串。如果是,则该函数返回str2在str1中首次出现的地址;否则,返回NULL。 源码: ...
分类:
其他好文 时间:
2016-09-13 22:04:14
阅读次数:
127
注意几点: 1.在获取字符串的每一位的时候可以使用 toCharArray() 和str.charAt(i)两种方式 2.char类型能自动转换成int类型。会将char类型转换成字符对应的的ascii码 3.int[] str1=new int[256] 全局变量没有初始值默认为0,如果是int[ ...
分类:
编程语言 时间:
2016-09-12 23:56:41
阅读次数:
190
1、复制/etc/rc.d/rc.sysinit文件至/tmp目录,将/tmp/rc.sysinit文件中的以至少一个空白字符开头的行的行首加#;#1.sed命令
#脚本文件
#/bin/bash
cp/etc/rc.d/rc.sysinit/tmp
#sed:文本行编辑器
#-i:对原文件直接进行编辑操作,默认sed是对模式空间的数据进行操作
#s/str1/s..
分类:
其他好文 时间:
2016-09-12 15:56:20
阅读次数:
290