2018年4月28日
摘要: 字符串行数Trim()可以去掉字符串前后的空格,如: C# Code string myString = " this is a test "; Console.WriteLine(myString.Trim()); View Code C# Code string myString = " thi 阅读全文
posted @ 2018-04-28 10:02 donchen-c 阅读(87252) 评论(0) 推荐(3)
摘要: 1、 去掉字符串前后所有空格: 代码如下: function Trim(str) { return str.replace(/(^\s*)|(\s*$)/g, ""); } View Code function Trim(str) { return str.replace(/(^\s*)|(\s*$ 阅读全文
posted @ 2018-04-28 09:53 donchen-c 阅读(1674) 评论(0) 推荐(0)