progress
This commit is contained in:
parent
16e76d6b31
commit
484dbfc9d9
529 changed files with 113694 additions and 0 deletions
25
AspClassic.VBScript/Runtime/StringExtensionsClass.cs
Normal file
25
AspClassic.VBScript/Runtime/StringExtensionsClass.cs
Normal file
|
@ -0,0 +1,25 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
namespace Dlrsoft.VBScript.Runtime
|
||||
{
|
||||
public static class StringExtensionsClass
|
||||
{
|
||||
public static string RemoveNonNumeric(this string s)
|
||||
{
|
||||
MatchCollection col = Regex.Matches(s, "[0-9]");
|
||||
StringBuilder sb = new StringBuilder();
|
||||
foreach (Match m in col)
|
||||
sb.Append(m.Value);
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
public static StringBuilder op_Addition(this StringBuilder sb, object o)
|
||||
{
|
||||
sb.Append(o);
|
||||
return sb;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue