Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Found a java function for making the first letter of the first word capital.
private String capitalize(final String line) {
return Character.toUpperCase(line.charAt(0)) + line.substring(1);
} -
@adempus you didn't know that? :D
Have you ever done python before or was it a while ago? -
adempus2786y@HampusMa
Not for very long, just sort of dived into it. Love that there's a method for capitalizing names in one shot 😄
Related Rants
String someStr = "your name";
// but i wanna capitalize it
someStr.capitalize(); // <-- operation has no effect
// ughh, fine 😒
String cappedStr = someStr.capitalise();
// wish I could just do this:
someStr .= capitalize(); // but it throws error 😩
devrant
readable code
verbosity
upgrade goals