using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace WebOssApplications.Common
{
public static class Extensions
{
///
/// Checks if the string starts with special character. This does not include any special character from
///
/// Value to check
/// True if the string starts with a special character
/// Throws if value is null
/// Throws if value is empty
public static bool StartsWithSymbol(this string value)
{
if (value == null)
{
throw new ArgumentNullException("value");
}
if (string.IsNullOrEmpty(value))
{
throw new ArgumentOutOfRangeException("value");
}
return char.IsSymbol(value, 0) || char.IsPunctuation(value, 0);
}
}
}