brerk 彻底终断循环,跳出for语句continue 中断当前循环,进行下一循环s.Length s的长度s.Trim() 去除两边空格s.TrimStart() 去除前面的空格s.TrimEnd() 去除后面的空格s.ToUpper() 字母变大写s.ToLower() ...
分类:
其他好文 时间:
2014-08-22 15:48:08
阅读次数:
233
html clearjs //去空白 function clearFun(str) { str = str.replace(/^\s+/, ''); for (var i = str.length - 1; i >= 0; i--) { ...
分类:
其他好文 时间:
2014-08-22 12:40:46
阅读次数:
136
最近写了蛮多PHP,也接触到挺多常用的函数,大多都记了笔记,发个博客出来,共同学习。其实感觉学习一门语言,语法逻辑是软素质,而对语言的熟悉程度只能随着使用时间的增长而慢慢增长,当对一门语言的函数、库、特性都深深了解了,才能勉强称得上是熟练或者精通吧。
1. trim(),从字符串两端删除空白字符和其他预定义字符,当然可以删除指定的字符。
类似的还有ltrim()、rtrim()。
2. __...
分类:
Web程序 时间:
2014-08-21 22:51:25
阅读次数:
345
brerk 彻底终断循环,跳出for语句continue 中断当前循环,进行下一循环字符串 .Length 字符串长度 .TrimStart() 截去开头空格 .TrimEnd() 截去结尾空格 .Trim() 截去开头跟结尾的空格 ....
分类:
其他好文 时间:
2014-08-21 21:00:44
阅读次数:
226
修改user.php文件,如果您网站的该文件修改过,按照下面的修改说明修改文件。查找代码:elseif ($action == 'act_login')在:$back_act = isset($_POST['back_act']) ? trim($_POST['back_act']) : ''; 下...
分类:
其他好文 时间:
2014-08-21 16:56:14
阅读次数:
202
Quoted from the https://www.kernel.org/doc/local/pr_debug.txtpr_debug() Some files call pr_debug(), which is ordinarily an empty macro that discard...
分类:
其他好文 时间:
2014-08-21 09:36:13
阅读次数:
240
6、实用函数 ● 修剪字符串$('#id').val($.trim($('#someid').val()))● 遍历集合可能这样写:var anArray = ['one','two'];for(var n = 0; n 3;})console.log(arr);//结果是:4 5 6如果把grep...
分类:
Web程序 时间:
2014-08-20 23:53:33
阅读次数:
356
1,vba字符串函数列表:Trim(string) 去掉string左右两端空白Ltrim(string) 去掉string左端空白Rtrim(string) 去掉string右端空白Len(string) 计算string长度Left(string, x) 取str...
分类:
其他好文 时间:
2014-08-20 12:16:22
阅读次数:
210