StringFinder.cs 707 B

1234567891011121314151617181920212223242526272829
  1. using Azylee.Core.DataUtils.CollectionUtils;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Linq;
  5. using System.Text;
  6. namespace Azylee.Core.DataUtils.StringUtils
  7. {
  8. public class StringFinder
  9. {
  10. public static bool has(string s, params string[] array)
  11. {
  12. bool result = true;
  13. if (Str.Ok(s) && Ls.ok(array))
  14. {
  15. foreach (var item in array)
  16. {
  17. if (!s.Contains(item))
  18. {
  19. result = false;
  20. break;
  21. }
  22. }
  23. return result;
  24. }
  25. return false;
  26. }
  27. }
  28. }