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

Popular posts from this blog

javascript - How to name a jQuery function to make a browser's back button work? -

collision detection - C++ library for mesh to mesh intersection: what is available? -

python - Django-easy-pdf: xhtml2pdf reporting reportlab 2.2+ is required, but 3.0 installed -