StringUtil.cs 435 B

12345678910111213141516171819202122
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. namespace GeekDesk.Util
  7. {
  8. public class StringUtil
  9. {
  10. public static bool IsEmpty(object str)
  11. {
  12. if (str == null || str.ToString().Length == 0 || str.ToString().Trim().Length == 0)
  13. {
  14. return true;
  15. }
  16. return false;
  17. }
  18. }
  19. }