728x90 728x90 SMALL Functions17 [JSP][JSTL functions] fn:indexOf() fn:indexOf() 지정된 하위 문자열이 처음으로 나타나는 문자열이 있는 인덱스를 반환합니다. Syntax int indexOf(java.lang.String, java.lang.String) Example index : ${fn:indexOf(str, 'Hello')} index : ${fn:indexOf(str, 'World')} Result index : 0 index : 6 2021. 7. 26. [JSP][JSTL functions] fn:escapeXml() fn:escapeXml() XML 마크업으로 해석될 수 있는 문자를 이스케이프합니다. Syntax java.lang.String escapeXml(java.lang.String) Example With escapeXml() Function str1 : ${fn:escapeXml(str1)} str2 : ${fn:escapeXml(str2)} Without escapeXml() Function: str1 : ${str1} str2 : ${str2} Result With escapeXml() Function str1 : This is normal String. str2 : This is XML String Without escapeXml() Function: str1 : This is normal Strin.. 2021. 7. 26. [JSP][JSTL functions] fn:endsWith() fn:endsWith() 입력 문자열이 지정된 접미사로 끝나는지 테스트합니다. Syntax boolean endsWith(java.lang.String, java.lang.String) Example String ends with 'World' String ends with 'World.' Result String ends with 'World.' 2021. 7. 25. [JSP][JSTL functions] fn:containsIgnoreCase() fn:containsIgnoreCase() 대소문자를 구분하지 않고 입력 문자열에 지정된 하위 문자열이 포함되어 있는지 테스트합니다. Syntax boolean containsIgnoreCase(java.lang.String, java.lang.String) Example Found 'hello' string Found 'Hello' string Result Found 'hello' String. Found 'Hello' string. 2021. 7. 25. 이전 1 2 3 4 5 다음 728x90 728x90 SMALL