css 파일 안에 


caption {position:absolute;}

 

아이폰으로 크롬,사파리에서는 '%'로 테이블 col width 값을 준 경우


간격이 모두 똑같아 보이는 현상이 생기는데, 이런 경우는 caption의 스타일에 position:absolute가 들어 있어서 생긴다. 


그렇다고 absolute를 빼버리면 top:-9999를 처리할 수가 없고, 이게 처리가 안되면, caption이 보인다.

 

따라서 다음과 같이 수정하는 것을 추천.


caption {visibility:hidden; overflow:hidden; width:0;height:0;font-size:0;line-height:0}



 

<div style="cursor:pointer;" onclick="window.scrollTo(0,0);">TOP</div>

바에서 Null 이나 빈값을 체크 할 때, StringUtils .isEmpty / .isBlank를 사용


StringUtils.isBlank ()

 StringUtils.isBlank (null)      = true
 StringUtils.isBlank ("")        = true  
 StringUtils.isBlank (" ")       = true  
 StringUtils.isBlank ("jungle")     = false  
 StringUtils.isBlank ("  jungle  ") = false


동작 방식 : StringUtils.isBlank ()


1
2
3
4
5
6
7
8
9
10
11
12
13
14
public static boolean isBlank(String str) {
    int strLen;
 
    if (str == null || (strLen = str.length()) == 0) {
        return true;
    }
 
    for (int i = 0; i < strLen; i++) {
        if ((Character.isWhitespace(str.charAt(i)) == false)) {
            return false;
        }
    }
    return true;
}
cs



StringUtils.isEmpty

 StringUtils.isEmpty(null)      = true
 StringUtils.isEmpty("")        = true  
 StringUtils.isEmpty(" ")       = false  
 StringUtils.isEmpty("jungle")     = false  
 StringUtils.isEmpty("  jungle  ") = false


동작 방식 : StringUtils.isEmpty


public static boolean isEmpty(Stirng str) {
    return str == null || str.length() == 0;
}


'Back-End' 카테고리의 다른 글

String 자릿수 표현식  (0) 2019.08.05
구분값을 추가하여 데이터 합치는 로직  (0) 2019.07.19
String 문자열 조건문의로 비교시  (0) 2018.07.12

+ Recent posts