File tree Expand file tree Collapse file tree 1 file changed +14
-4
lines changed
src/main/java/dev/ebullient/convert/qute Expand file tree Collapse file tree 1 file changed +14
-4
lines changed Original file line number Diff line number Diff line change 1
1
package dev .ebullient .convert .qute ;
2
2
3
- import static dev .ebullient .convert .StringUtil .pluralize ;
4
- import static dev .ebullient .convert .StringUtil .toTitleCase ;
5
3
6
4
import java .util .Collection ;
7
5
@@ -27,7 +25,19 @@ static String asBonus(Integer value) {
27
25
/** Return the string capitalized. Example: `{resource.name.capitalized}` */
28
26
@ JavadocVerbatim
29
27
static String capitalized (String s ) {
30
- return toTitleCase (s );
28
+ return StringUtil .toTitleCase (s );
29
+ }
30
+
31
+ /** Return the string capitalized. Example: `{resource.name.capitalized}` */
32
+ @ JavadocVerbatim
33
+ static String uppercaseFirst (String s ) {
34
+ return StringUtil .uppercaseFirst (s );
35
+ }
36
+
37
+ /** Return the lowercase string. Example: `{resource.name.lowercase}` */
38
+ @ JavadocVerbatim
39
+ static String lowercase (String s ) {
40
+ return s == null || s .isEmpty () ? s : s .toLowerCase ();
31
41
}
32
42
33
43
/**
@@ -37,7 +47,7 @@ static String capitalized(String s) {
37
47
*/
38
48
@ JavadocVerbatim
39
49
static String pluralizeLabel (Collection <?> collection , String s ) {
40
- return pluralize (s , collection .size (), true );
50
+ return StringUtil . pluralize (s , collection .size (), true );
41
51
}
42
52
43
53
/**
You can’t perform that action at this time.
0 commit comments