2 // System.Globalization.TextInfo.cs
5 // Dick Porter (dick@ximian.com)
6 // Duncan Mak (duncan@ximian.com)
8 // (C) 2002 Ximian, Inc.
11 using System.Globalization;
12 using System.Runtime.Serialization;
14 namespace System.Globalization {
17 public class TextInfo: IDeserializationCallback
19 private int m_win32LangID;
21 bool m_useUserOverride;
27 internal TextInfo (int lcid)
29 this.m_win32LangID=lcid;
33 public virtual int ANSICodePage
41 public virtual int EBCDICCodePage
49 public virtual string ListSeparator
57 public virtual int MacCodePage
65 public virtual int OEMCodePage
73 public override bool Equals(object obj)
75 throw new NotImplementedException();
78 public override int GetHashCode()
80 return(m_win32LangID);
84 public virtual char ToLower(char c)
86 return Char.ToLower (c);
90 public virtual string ToLower(string str)
93 throw new ArgumentNullException("string is null");
96 Text.StringBuilder s = new Text.StringBuilder ();
98 foreach (char c in str) {
99 s.Append (Char.ToLower (c));
102 return s.ToString ();
106 public override string ToString()
111 public string ToTitleCase (string str)
114 throw new ArgumentNullException("string is null");
116 Text.StringBuilder s = new Text.StringBuilder ();
118 s.Append (Char.ToUpper (str [0]));
120 for (int i = 1; i < str.Length; i ++)
123 return s.ToString ();
127 public virtual char ToUpper(char c)
133 public virtual string ToUpper(string str)
136 throw new ArgumentNullException("string is null");
142 /* IDeserialization interface */
144 void IDeserializationCallback.OnDeserialization(object sender)