How can I convert the first character of a C# string to lowercase? -
can tell me how can this. know there functions convert lowercase first character.
there must multiple ways of doing that, can use char.tolower
on first character , substring starting index 1. can try:
string str = "aaaaaa"; str = char.tolower(str[0]) + str.substring(1);
it better if check string length, avoid exception.
if(str.length > 0) { str = char.tolower(str[0]) + str.substring(1); }
Comments
Post a Comment