由网友(秋忆、花飘落)分享简介:我不是指与textInput,无论是。我的意思是,一旦你有静态的文本在一个TextView(填充从数据库调用用户输入的数据(可能不是大写)),我怎么能确保他们的资本?I'm not referring to textInput, either. I mean that once you have static tex...
我不是指与textInput,无论是。我的意思是,一旦你有静态的文本在一个TextView(填充从数据库调用用户输入的数据(可能不是大写)),我怎么能确保他们的资本?
I'm not referring to textInput, either. I mean that once you have static text in a TextView (populated from a Database call to user inputted data (that may not be Capitalized)), how can I make sure they are capitalized?
谢谢!
推荐答案
我应该能够通过标准的java字符串处理,没有Android或TextView的具体做到这一点。
I should be able to accomplish this through standard java string manipulation, nothing Android or TextView specific.
是这样的:
String upperString = myString.substring(0,1).toUpperCase() + myString.substring(1);
虽然有可能是一百万的方式来做到这一点。请参见字符串的文档。
相关推荐
最新文章