```javascriptfunction trim() { let reg = /(^\s*)|(\s*$)/g let res = this.replace(reg, '') return res}String.prototype.trim = trim// 测试let str = ' hell... ...
分类:
其他好文 时间:
2020-04-03 18:10:49
阅读次数:
64
TOOL: data analysis --rank and percentile AVERAGE(), TRIMMEAN(...,percenatge) , MEDIAN() , MODE() , PERCENTILE(...,k) , QUARTILE(...,k) var/Var:方差 VAR ...
分类:
其他好文 时间:
2020-04-03 16:49:55
阅读次数:
67
/// <summary>/// cmd/// </summary>public class CmdHelper{ /// <summary> /// 命令行删除文件 /// </summary> /// <param name="fullPath"></param> public static v ...
let str = "no作no死,你能你can,不能no哔哔!", reg = /\b[a-z]+\b/ig; str = str.replace(reg, value => { return " " + value + " "; }).trim(); // => String.prototype ...
分类:
其他好文 时间:
2020-04-02 00:53:53
阅读次数:
111
1.filter_var()函数(filter过滤的意思) <?php #验证邮箱函数的使用 function check_email($email) { $result = trim($email);//trim方法去除首位的空格 if (filter_var($result, FILTER_VA ...
分类:
Web程序 时间:
2020-04-01 16:17:02
阅读次数:
120
https://hsivonen.fi/modern-cpp-in-rust/ Since version 56, Firefox has had a new character encoding conversion library called encoding_rs. It is writte ...
分类:
编程语言 时间:
2020-03-29 21:26:15
阅读次数:
81
MyBatis中常用动态SQL: choose when otherwise if trim where foreach 1,<if>元素被用来有条件地嵌入SQL片段,如果测试条件被赋值为true,则相应地SQL片段将会被添加到SQL语句中。 <select id="searchCourses" p ...
分类:
数据库 时间:
2020-03-29 15:28:05
阅读次数:
149
JS字符串函数: 查找: indexOf(s,start) //查找某个字符串首次出现的位置,默认start=0,没有找到返回-1 eg:str.indexOf("hi") lastIndexOf(s,start)//同上,查找最后出现的位置 search() includes() match() ...
分类:
Web程序 时间:
2020-03-29 10:35:28
阅读次数:
88
原题 这个题很简单的.最开始的想法是trim一下去掉开头的空格.然后放到字符串中,转成整数. public static int myAtoi(String str) { StringBuilder res = new StringBuilder(""); StringBuilder str2 = ...
分类:
其他好文 时间:
2020-03-28 23:35:28
阅读次数:
94
function trim(str) { if (str && typeof str "string") { return str.replace(/^\s+/,"").replace(/\s+$/,""); //去除前后空白符 } } console.log(' '+trim(' jjj jjj ...
分类:
Web程序 时间:
2020-03-28 21:56:32
阅读次数:
100