C# .NET - how to convert upper case into lowercase
Asked By Gayathri G on 06-Aug-06 11:44 PM
how to convert upper case into lowercase any direct function is there i searched but iam not getting can plz tell me.
ToLowerCase() - Asked By Shallu Gupta on 06-Aug-06 11:52 PM
there is a function available in string class ToLowercase();
string str ="UPPERCASE"
This is probably a dumb answer but - Asked By Jerry Laudat on 06-Aug-06 11:57 PM
can't you just do this?
string s = "BOY";
check this out - Asked By K Pravin Kumar Reddy on 07-Aug-06 12:55 AM
static string MyReplace(Match m)
// will render a string matched by
//delegate MatchEvaluator to lower case
string x = m.ToString().ToLower();
The traditional way of doing this is suming the difference between letter "A" and "a" to the first character. However, this will not work in internationalized scenarios. Here are the good reasons together with a great article on Unicode in general.
So I use the following approach, which is I18N-ready:
private string MakeFirstUpperMakePascalCase( string name )
if ( name.Length <= 1) return name.ToUpper();
return Char.ToUpper( name ).ToString() + name.Substring( 1 );
Char letters = name.ToCharArray();
letters = Char.ToUpper( letters );
return new string( letters );
}We don't need to pass the current culture to both String.ToUpper and Char.ToUpper() as they already do that internally.
convert upper case into lowercase - Asked By J S on 07-Aug-06 01:32 AM
This is cool..
Check this - Asked By anupam misra on 07-Aug-06 06:13 AM
Answer - ganesh ramakrishnan replied to Gayathri G on 06-Mar-08 07:34 AM
string sStr = textBox1.Text.ToLower();
textBox2.Text = sStr;
this should be done to convert the upper case to lower case in c#