string-IsNullOrWhiteSpace

        [Pure]
        public static bool IsNullOrWhiteSpace(String value) {
            if (value == null) return true;
 
            for(int i = 0; i < value.Length; i++) {
                if(!Char.IsWhiteSpace(value[i])) return false;
            }
 
            return true;
        }

 

posted @ 2021-11-19 14:00  vba是最好的语言  阅读(22)  评论(0编辑  收藏  举报