StringHelper.cs 486 B

1234567891011121314151617181920212223242526
  1. namespace Xilium.CefGlue
  2. {
  3. using System;
  4. using System.Collections.Generic;
  5. using System.Text;
  6. internal static class StringHelper
  7. {
  8. public static bool IsNullOrEmpty(string value)
  9. {
  10. return value == null || value.Length == 0;
  11. }
  12. public static bool IsNullOrWhiteSpace(string value)
  13. {
  14. if (value == null) return true;
  15. for (int i = 0; i < value.Length; i++)
  16. {
  17. if (!char.IsWhiteSpace(value[i])) return false;
  18. }
  19. return true;
  20. }
  21. }
  22. }