// Token: 0x060013F9 RID: 5113 RVA: 0x00023E94 File Offset: 0x00022094 public static bool IsNumeric(string numericText) { bool flag = true; if (!TextUtility.IsNullOrEmpty(numericText)) { if (numericText.StartsWith("-")) { numericText = numericText.Replace("-", string.Empty); } foreach (char c in numericText) { flag = char.IsNumber(c); if (!flag) { return(flag); } } } else { flag = false; } return(flag); }
// Token: 0x060013F3 RID: 5107 RVA: 0x00023D44 File Offset: 0x00021F44 public static string ConvertText(string textToSecure) { string text = TextUtility.HtmlEncode(textToSecure); text = text.Replace("`", "`"); text = text.Replace("´", "´"); text = text.Replace("'", "'"); text = text.Replace("-", "-"); text = text.Replace("!", "!"); return(text.Replace("?", "?")); }
// Token: 0x060013F7 RID: 5111 RVA: 0x00023DC0 File Offset: 0x00021FC0 public static long InetAToN(string addressIP) { long result = 0L; if (addressIP.Equals("::1")) { addressIP = "127.0.0.1"; } if (!TextUtility.IsNullOrEmpty(addressIP)) { string[] array = addressIP.ToString().Split(new char[] { '.' }); if (array.Length == 4) { bool flag = true; int num = 0; long num2 = 0L; for (int i = array.Length - 1; i >= 0; i--) { bool flag2 = int.TryParse(array[i], out num); if (flag2 && num >= 0 && num < 256) { num2 += (long)(num % 256) * (long)Math.Pow(256.0, (double)(3 - i)); } else { flag = false; } } if (flag) { result = num2; } } } return(result); }
// Token: 0x060013FC RID: 5116 RVA: 0x00023F78 File Offset: 0x00022178 public static List <int> IndexOfAll(string haystack, string needle) { int num = 0; List <int> list = new List <int>(); if (!TextUtility.IsNullOrEmpty(haystack) && !TextUtility.IsNullOrEmpty(needle)) { int length = needle.Length; int num2; do { num2 = haystack.IndexOf(needle); if (num2 > -1) { haystack = haystack.Substring(num2 + length); list.Add(num2 + num); num += num2 + length; } }while (num2 > -1 && !TextUtility.IsNullOrEmpty(haystack)); } return(list); }