Android Question text to uppercase

pazzokli

Active Member
Licensed User
Longtime User
Hi to all,
how can I convert text all uppercase.
for example Home --> HOME

Thanks
 

DonManfred

Expert
Licensed User
Longtime User
B4X:
Sub ToUpper(text As String) As String
    Return text.ToUpperCase
End Sub
 
Upvote 0

npsonic

Active Member
Licensed User
You want to convert specific words or all text?

Example if you want to convert specific words from some text.
B4X:
Sub ConvertToUpperCase (Target As String, Text As String) As String
    If Text.Contains(Target) Then Return Text.Replace(Target,Target.ToUpperCase)
    Return Text
End Sub
 
Upvote 0

Star-Dust

Expert
Licensed User
Longtime User
B4X:
MyString="home".ToUpperCase
:D
B4X:
MyString=MyString.ToUpperCase
:p
B4X:
Log(MyString)
log(MyString.toUpperCase)
:)
B4X:
MyString=EditText.Text.ToUppercase
;)
B4X:
EditText.Text=EditText.Text.ToUppercase
o_O
 
Last edited:
Upvote 0

Similar Threads

Top