We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0480cb9 commit c90683eCopy full SHA for c90683e
lkhyun/202512/PGM Lv2 JadenCase 문자열 만들기.md
@@ -0,0 +1,24 @@
1
+```java
2
+class Solution {
3
+ public String solution(String s) {
4
+ String temp = s.toLowerCase();
5
+ StringBuilder sb = new StringBuilder();
6
+ String[] splits = temp.split(" ",-1);
7
+ for (int i = 0; i < splits.length; i++) {
8
+ String split = splits[i];
9
+ if (split.isEmpty()) {
10
+ } else if (!Character.isDigit(split.charAt(0))) {
11
+ sb.append(Character.toUpperCase(split.charAt(0)));
12
+ sb.append(split.substring(1));
13
+ } else {
14
+ sb.append(split);
15
+ }
16
+
17
+ if (i < splits.length - 1) {
18
+ sb.append(" ");
19
20
21
+ return sb.toString();
22
23
+}
24
+```
0 commit comments