+ * - Adding IsNullOrWhiteSpace extension for support for Xbox 360
+ * - Upon some testing - developers will need to use #if WINDOWS/#endif tags to make sure they can't use XNACC in WP7/Xbox360
This commit is contained in:
		@@ -1,4 +1,6 @@
 | 
			
		||||
 | 
			
		||||
using System.Text.RegularExpressions;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
namespace Axios.Engine.Extensions
 | 
			
		||||
{
 | 
			
		||||
    public static class AxiosExtensions_String
 | 
			
		||||
@@ -16,5 +18,16 @@ namespace Axios.Engine.Extensions
 | 
			
		||||
            int len = end - start;               // Calculate length
 | 
			
		||||
            return source.Substring(start, len); // Return Substring of length
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public static bool IsNullOrWhiteSpace(this string str)
 | 
			
		||||
        {
 | 
			
		||||
            if (str == null || str == string.Empty)
 | 
			
		||||
                return true;
 | 
			
		||||
 | 
			
		||||
            if (Regex.Match(str, "([:blank:])").Success)
 | 
			
		||||
                return true;
 | 
			
		||||
 | 
			
		||||
            return false;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user