anthony anthony - 4 months ago 11
Android Question

Android: How to set substrings in lowercase in my string?

I want to set all my hashtags in lowercase in a string:


"Hello I'm a men #Athlete et I'm going to do sport #NeverGiveUp"


Should become:


"Hello I'm a men #athlete et I'm going to
do sport #nevergiveup"

Answer

if your problem is how to convert all to simple letters hope this helps

String myString = "HashTag";
  String myNewSimpleLetterString = myString.substring(0,5).toLowerCase(); //subString will get the characters from 0 - 5