
0.asp.net的一些小技巧
laolaowhn
这个作者很懒,什么都没留下…
展开
-
判断一个字符串在另一个字符串中出现的次数
/// /// 返回字符串在字符串中出现的次数 /// /// 要检测出现的字符 /// 要检测的字符串 /// 出现次数 public static int GetCharInStringCount(string Char, string String) { string str =转载 2009-05-11 22:57:00 · 2292 阅读 · 0 评论 -
生成随机数
/// /// 生成0-9随机数 /// /// 生成长度 /// public static string RndNum(int VcodeNum) { StringBuilder sb = new StringBuilder(VcodeNum); Random转载 2009-05-12 15:32:00 · 709 阅读 · 0 评论 -
正则表达式:转化字符匹配大小写
目标匹配类似于:abc_def_gh转化结果为:AbcDefGh using System.Text.RegularExpressionsstatic string CapText(Match m) { // Get the matched string. st原创 2009-10-14 11:07:00 · 3344 阅读 · 0 评论