Method used for to display every char of the Word in a String in Uppercase..

 public static String stringConverter(String defaultString)
    { 
    String splitedStringarray[]=defaultString.split(" ");
    String convertedString="";
   
    for(int i=0;i<splitedStringarray.length;i++)
    {
        char[] charOwner=splitedStringarray[i].toCharArray();
        if(i!=0)
        {
            convertedString=convertedString+" "+Character.toUpperCase(charOwner[0])+splitedStringarray[i].substring(1);

        }
        else{
            convertedString=Character.toUpperCase(charOwner[0])+splitedStringarray[i].substring(1);

        }
    }
    return convertedString;
    }

Comments

Popular posts from this blog

Custom Dialog with no title and full screen in Android

code to display .pdf,.text,.DOC,.DOCX,.doc extension files exists in SDCard

Best working code to set Date limits on Date Picker Dialog,in Android