src.txt 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. /* ====================================================================
  2. * The Tmax soft License, Version 1.1
  3. *
  4. * Copyright (c) 1997-2004 The Tmax software.
  5. * All rights reserved.
  6. * html code omitted for readability.
  7. /* ====================================================================
  8. /* fn.jsp */
  9. <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
  10. <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
  11. <h2> JSTL Functions Test </h2>
  12. <c:set var="s1" value="This is a JSTL Function Test"/>
  13. <table width='750' border='0' align='left' cellpadding='5'>
  14. <tr bgcolor="#bdb76b" height="40">
  15. <td><b><center>functions</center></b></td>
  16. <td><b><center>Input Strings</center></b></td>
  17. <td colspan=2><center><b>Arguments</center></b></td>
  18. <td><center><b>Results</b></center></td>
  19. </tr>
  20. <tr bgcolor="white">
  21. <td><b>length</b></td>
  22. <td>${s1}</td>
  23. <td colspan=2></td>
  24. <td>${fn:length(s1)}</td>
  25. </tr>
  26. <tr bgcolor="f5f5dc">
  27. <td><b>toLowerCase</b></td>
  28. <td>${s1}</td>
  29. <td colspan=2></td>
  30. <td>${fn:toLowerCase(s1)}</td>
  31. </tr>
  32. <tr bgcolor="white">
  33. <td><b>toUpperCase</b></td>
  34. <td>${s1}</td>
  35. <td colspan=2></td>
  36. <td>${fn:toUpperCase(s1)}</td>
  37. </tr>
  38. <tr bgcolor="f5f5dc">
  39. <td><b>substring</b></td>
  40. <td>${s1}</td>
  41. <td>11</td>
  42. <td>17</td>
  43. <td>${fn:substring(s1, 11, 17)}</td>
  44. </tr>
  45. <tr bgcolor="white">
  46. <td rowspan=2><b>substringAfter</b></td>
  47. <td>${s1}</td>
  48. <td colspan=2>This</td>
  49. <td>${fn:substringAfter(s1, "This")}</td>
  50. </tr>
  51. <tr bgcolor="white">
  52. <td>${s1}</td>
  53. <td colspan=2>empty string</td>
  54. <td>${fn:substringAfter(s1, "")}</td>
  55. </tr>
  56. <tr bgcolor="f5f5dc">
  57. <td><b>substringBefore</b></td>
  58. <td>${s1}</td>
  59. <td colspan=2>JSTL</td>
  60. <td>${fn:substringBefore(s1, "JSTL")}</td>
  61. </tr>
  62. <tr bgcolor="white">
  63. <td><b>replace</b></td>
  64. <td>${s1}</td>
  65. <td>s</td>
  66. <td>*</td>
  67. <td>${fn:replace(s1, "s", "*")}</td>
  68. </tr>
  69. <tr bgcolor="f5f5dc">
  70. <td rowspan=2><b>contains</b></td>
  71. <td>${s1}</td>
  72. <td colspan=2>JSTL</td>
  73. <td>${fn:contains(s1, "JSTL")}</td>
  74. </tr>
  75. <tr bgcolor="f5f5dc">
  76. <td>${s1}</td>
  77. <td colspan=2>jstl</td>
  78. <td>${fn:contains(s1, "jstl")}</td>
  79. </tr>
  80. <tr bgcolor="white">
  81. <td rowspan=2><b>containsIgnoreCase</b></td>
  82. <td>${s1}</td>
  83. <td colspan=2>JSTL</td>
  84. <td>${fn:containsIgnoreCase(s1, "JSTL")}</td>
  85. </tr>
  86. <tr bgcolor="white">
  87. <td>${s1}</td>
  88. <td colspan=2>jstl</td>
  89. <td>${fn:containsIgnoreCase(s1, "jstl")}</td>
  90. </tr>
  91. <tr bgcolor="f5f5dc">
  92. <td rowspan=2><b>startsWith</b></td>
  93. <td>${s1}</td>
  94. <td colspan=2>This is</td>
  95. <td>${fn:startsWith(s1, "This is")}</td>
  96. </tr>
  97. <tr bgcolor="f5f5dc">
  98. <td>${s1}</td>
  99. <td colspan=2>JSTL</td>
  100. <td>${fn:startsWith(s1, "JSTL")}</td>
  101. </tr>
  102. <tr bgcolor="white">
  103. <td rowspan=2><b>endsWith</b></td>
  104. <td>${s1}</td>
  105. <td colspan=2>JSTL</td>
  106. <td>${fn:endsWith(s1, "JSTL")}</td>
  107. </tr>
  108. <tr bgcolor="white">
  109. <td>${s1}</td>
  110. <td colspan=2>Test</td>
  111. <td>${fn:endsWith(s1, "Test")}</td>
  112. </tr>
  113. <tr bgcolor="f5f5dc">
  114. <td rowspan=2><b>indexOf</b></td>
  115. <td>${s1}</td>
  116. <td colspan=2>JSTL</td>
  117. <td>${fn:indexOf(s1, "JSTL")}</td>
  118. </tr>
  119. <tr bgcolor="f5f5dc">
  120. <td>${s1}</td>
  121. <td colspan=2>Test</td>
  122. <td>${fn:indexOf(s1, "Test")}</td>
  123. </tr>
  124. </table>