자바 인코딩 공백

  • goguma
    (고구마엔사이다)
  • goguma's Avatar 이 글의 작성자
  • Offline
  • Newbie
  • Newbie
더보기
13 Jul 2018 21:37 - 13 Jul 2018 21:38 #3685 작성자: goguma
goguma 님의 글: 자바 인코딩 공백
String text = "This is test.";
System.out.println(text);
	
String encode = URLEncoder.encode(text);
System.out.println(encode);
	
String encodeReplace = encode.replaceAll("\\+","%20");
System.out.println(encodeReplace);

결과

This is test.
This+is+test.
This%20is%20test.
Time to create page: 0.054 seconds
Powered by Kunena Forum