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
25 internal TextInfo (int lcid)
31 public virtual int ANSICodePage
39 public virtual int EBCDICCodePage
47 public virtual string ListSeparator
55 public virtual int MacCodePage
63 public virtual int OEMCodePage
71 public override bool Equals(object obj)
73 throw new NotImplementedException();
76 public override int GetHashCode()
82 public virtual char ToLower(char c)
84 return Char.ToLower (c);
88 public virtual string ToLower(string str)
91 throw new ArgumentNullException("string is null");
94 Text.StringBuilder s = new Text.StringBuilder ();
96 foreach (char c in str) {
97 s.Append (Char.ToLower (c));
100 return s.ToString ();
104 public override string ToString()
109 public string ToTitleCase (string str)
112 throw new ArgumentNullException("string is null");
114 Text.StringBuilder s = new Text.StringBuilder ();
116 s.Append (Char.ToUpper (str [0]));
118 for (int i = 1; i < str.Length; i ++)
121 return s.ToString ();
125 public virtual char ToUpper(char c)
131 public virtual string ToUpper(string str)
134 throw new ArgumentNullException("string is null");
140 /* IDeserialization interface */
142 void IDeserializationCallback.OnDeserialization(object sender)