File tree 1 file changed +6
-6
lines changed
1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,8 @@ public static void main(String[] args) {
9
9
int len = s .length ();
10
10
String sTmp = "" ;
11
11
boolean ok = false ;
12
+
13
+ // Xóa các dấu " " trong chuỗi
12
14
for (int i =0 ;i <len ;i ++){
13
15
if (s .charAt (i ) != ' ' ){
14
16
sTmp = sTmp + s .charAt (i );
@@ -19,16 +21,14 @@ else if(ok == true){
19
21
ok = false ;
20
22
}
21
23
}
22
- // System.out.println(sTmp);
24
+
25
+ // Chuyển tât cả các kí tự thành chữ thường
23
26
String s1 = new String (sTmp );
24
27
s1 = sTmp .toLowerCase ();
25
28
len = sTmp .length ();
26
29
String res = "" ;
27
- // char ch='\0';
28
- // char fUpper = Character.toUpperCase(s1.charAt(0));
29
-
30
- // System.out.println(fUpper);
31
- // res = res + ch;
30
+
31
+ // Chuyển các kí tự đầu sang chữ hoa.
32
32
for (int i =0 ;i <len ;i ++){
33
33
if (i ==0 ){
34
34
char ch = Character .toUpperCase (s1 .charAt (i ));
You can’t perform that action at this time.
0 commit comments