ValidateHttp.cs 540 B

123456789101112131415161718192021222324252627
  1. using System;
  2. namespace PCL
  3. {
  4. // Token: 0x02000145 RID: 325
  5. public class ValidateHttp : Validate
  6. {
  7. // Token: 0x06000D6D RID: 3437 RVA: 0x0005B834 File Offset: 0x00059A34
  8. public override string Validate(string Str)
  9. {
  10. if (Str.EndsWithF("/", false))
  11. {
  12. Str = Str.Substring(0, checked(Str.Length - 1));
  13. }
  14. string result;
  15. if (!ModBase.RegexCheck(Str, "^(http[s]?)\\://", 0))
  16. {
  17. result = "输入的网址无效!";
  18. }
  19. else
  20. {
  21. result = "";
  22. }
  23. return result;
  24. }
  25. }
  26. }