// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0
using System;
namespace System.Globalization
{
- public sealed class CharUnicodeInfo
+ public static class CharUnicodeInfo
{
- private CharUnicodeInfo () {}
-
- public static int GetDecimalDigitValue (char c)
+ public static int GetDecimalDigitValue (char ch)
{
- int i = (int) c;
+ int i = (int) ch;
switch (i) {
// They are not decimal digits but are regarded as they were.
case 178:
if (8320 <= i && i < 8330)
return i - 8320;
- if (!Char.IsDigit (c))
+ if (!Char.IsDigit (ch))
return -1;
if (i < 58)
return GetDecimalDigitValue (s [index]);
}
- public static int GetDigitValue (char c)
+ public static int GetDigitValue (char ch)
{
- int i = GetDecimalDigitValue (c);
+ int i = GetDecimalDigitValue (ch);
if (i >= 0)
return i;
- i = (int) c;
+ i = (int) ch;
if (i == 9450)
return 0;
return GetDigitValue (s [index]);
}
- public static double GetNumericValue (char c)
+ public static double GetNumericValue (char ch)
{
- int i = GetDigitValue (c);
+ int i = GetDigitValue (ch);
if (i >= 0)
return i;
- i = (int) c;
+ i = (int) ch;
switch (i) {
case 188:
if (12977 <= i && i < 12992)
return i - 12941;
- if (!char.IsNumber (c))
+ if (!char.IsNumber (ch))
return -1;
if (i < 3891)
return GetNumericValue (s [index]);
}
- public static UnicodeCategory GetUnicodeCategory (char c)
+ public static UnicodeCategory GetUnicodeCategory (char ch)
{
- return Char.GetUnicodeCategory (c);
+ return Char.GetUnicodeCategory (ch);
}
- public static UnicodeCategory GetUnicodeCategory (string s,
- int index)
+ public static UnicodeCategory GetUnicodeCategory (string s, int index)
{
if (s == null)
throw new ArgumentNullException ("s");
}
}
}
-
-#endif