public static double GetNumericValue (string str, int index)
{
if (str == null)
- throw new ArgumentNullException (Locale.GetText ("str is a null reference"));
+ throw new ArgumentNullException ("str");
if (index < 0 || index >= str.Length)
throw new ArgumentOutOfRangeException (Locale.GetText (
- "The value of index is less than zero, or greater than or equal to the length of str"));
-
+ "The value of index is less than zero, or greater than or equal to the length of str."));
return GetNumericValue (str[index]);
}
public static UnicodeCategory GetUnicodeCategory (string str, int index)
{
if (str == null)
- throw new ArgumentNullException (Locale.GetText ("str is a null reference"));
+ throw new ArgumentNullException ("str");
if (index < 0 || index >= str.Length)
- throw new ArgumentOutOfRangeException (Locale.GetText ("The value of index is less "+
- "than zero, or greater than or equal to the length of str"));
+ throw new ArgumentOutOfRangeException (Locale.GetText (
+ "The value of index is less than zero, or greater than or equal to the length of str."));
return GetUnicodeCategory (str[index]);
}
public static bool IsControl (string str, int index)
{
if (str == null)
- throw new ArgumentNullException (Locale.GetText ("Str is a null reference"));
+ throw new ArgumentNullException ("str");
if (index < 0 || index >= str.Length)
throw new ArgumentOutOfRangeException (Locale.GetText (
- "The value of index is less than zero, or greater than or equal to the length of str"));
+ "The value of index is less than zero, or greater than or equal to the length of str."));
return IsControl (str[index]);
}
public static bool IsDigit (string str, int index)
{
if (str == null)
- throw new ArgumentNullException (Locale.GetText ("Str is a null reference"));
+ throw new ArgumentNullException ("str");
if (index < 0 || index >= str.Length)
throw new ArgumentOutOfRangeException (Locale.GetText (
- "The value of index is less than zero, or greater than or equal to the length of str"));
+ "The value of index is less than zero, or greater than or equal to the length of str."));
return IsDigit (str[index]);
}
public static bool IsLetter (string str, int index)
{
if (str == null)
- throw new ArgumentNullException (Locale.GetText ("str is a null reference"));
+ throw new ArgumentNullException ("str");
if (index < 0 || index >= str.Length)
throw new ArgumentOutOfRangeException (Locale.GetText (
- "The value of index is less than zero, or greater than or equal to the length of str"));
+ "The value of index is less than zero, or greater than or equal to the length of str."));
return IsLetter (str[index]);
}
public static bool IsLetterOrDigit (string str, int index)
{
if (str == null)
- throw new ArgumentNullException (Locale.GetText ("str is a null reference"));
+ throw new ArgumentNullException ("str");
if (index < 0 || index >= str.Length)
throw new ArgumentOutOfRangeException (Locale.GetText (
- "The value of index is less than zero, or greater than or equal to the length of str"));
+ "The value of index is less than zero, or greater than or equal to the length of str."));
return IsLetterOrDigit (str[index]);
}
public static bool IsLower (string str, int index)
{
if (str == null)
- throw new ArgumentNullException (Locale.GetText ("str is a null reference"));
+ throw new ArgumentNullException ("str");
if (index < 0 || index >= str.Length)
throw new ArgumentOutOfRangeException (Locale.GetText (
- "The value of index is less than zero, or greater than or equal to the length of str"));
+ "The value of index is less than zero, or greater than or equal to the length of str."));
return IsLower (str[index]);
}
public static bool IsNumber (string str, int index)
{
if (str == null)
- throw new ArgumentNullException (Locale.GetText ("str is a null reference"));
+ throw new ArgumentNullException ("str");
if (index < 0 || index >= str.Length)
throw new ArgumentOutOfRangeException (Locale.GetText (
- "The value of index is less than zero, or greater than or equal to the length of str"));
+ "The value of index is less than zero, or greater than or equal to the length of str."));
return IsNumber (str[index]);
}
public static bool IsPunctuation (string str, int index)
{
if (str == null)
- throw new ArgumentNullException (Locale.GetText ("str is a null reference"));
+ throw new ArgumentNullException ("str");
if (index < 0 || index >= str.Length)
throw new ArgumentOutOfRangeException (Locale.GetText (
- "The value of index is less than zero, or greater than or equal to the length of str"));
+ "The value of index is less than zero, or greater than or equal to the length of str."));
return IsPunctuation (str[index]);
}
public static bool IsSeparator (string str, int index)
{
if (str == null)
- throw new ArgumentNullException (Locale.GetText ("str is a null reference"));
+ throw new ArgumentNullException ("str");
if (index < 0 || index >= str.Length)
throw new ArgumentOutOfRangeException (Locale.GetText (
- "The value of index is less than zero, or greater than or equal to the length of str"));
+ "The value of index is less than zero, or greater than or equal to the length of str."));
return IsSeparator (str[index]);
}
public static bool IsSurrogate (string str, int index)
{
if (str == null)
- throw new ArgumentNullException (Locale.GetText ("str is a null reference"));
+ throw new ArgumentNullException ("str");
if (index < 0 || index >= str.Length)
throw new ArgumentOutOfRangeException (Locale.GetText (
- "The value of index is less than zero, or greater than or equal to the length of str"));
+ "The value of index is less than zero, or greater than or equal to the length of str."));
return IsSurrogate (str[index]);
}
public static bool IsSymbol (string str, int index)
{
if (str == null)
- throw new ArgumentNullException (Locale.GetText ("str is a null reference"));
+ throw new ArgumentNullException ("str");
if (index < 0 || index >= str.Length)
throw new ArgumentOutOfRangeException (Locale.GetText (
- "The value of index is less than zero, or greater than or equal to the length of str"));
+ "The value of index is less than zero, or greater than or equal to the length of str."));
return IsSymbol (str[index]);
}
public static bool IsUpper (string str, int index)
{
if (str == null)
- throw new ArgumentNullException (Locale.GetText ("str is a null reference"));
+ throw new ArgumentNullException ("str");
if (index < 0 || index >= str.Length)
throw new ArgumentOutOfRangeException (Locale.GetText (
- "The value of index is less than zero, or greater than or equal to the length of str"));
+ "The value of index is less than zero, or greater than or equal to the length of str."));
return IsUpper (str[index]);
}
public static bool IsWhiteSpace (string str, int index)
{
if (str == null)
- throw new ArgumentNullException (Locale.GetText ("str is a null reference"));
+ throw new ArgumentNullException ("str");
if (index < 0 || index >= str.Length)
throw new ArgumentOutOfRangeException (Locale.GetText (
- "The value of index is less than zero, or greater than or equal to the length of str"));
+ "The value of index is less than zero, or greater than or equal to the length of str."));
return IsWhiteSpace (str[index]);
}
public static char Parse (string str)
{
- if (str == null)
- throw new ArgumentNullException (Locale.GetText ("str is a null reference"));
+ if (str == null)
+ throw new ArgumentNullException ("str");
if (str.Length != 1)
throw new FormatException ("string contains more than one character.");