StringUtils.html 12KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2. <!-- NewPage -->
  3. <html lang="en">
  4. <head>
  5. <!-- Generated by javadoc (1.8.0_131) on Sat May 27 07:28:13 EDT 2017 -->
  6. <title>StringUtils</title>
  7. <meta name="date" content="2017-05-27">
  8. <link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
  9. <script type="text/javascript" src="../../../../script.js"></script>
  10. </head>
  11. <body>
  12. <script type="text/javascript"><!--
  13. try {
  14. if (location.href.indexOf('is-external=true') == -1) {
  15. parent.document.title="StringUtils";
  16. }
  17. }
  18. catch(err) {
  19. }
  20. //-->
  21. var methods = {"i0":9,"i1":9,"i2":9,"i3":9};
  22. var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],8:["t4","Concrete Methods"]};
  23. var altColor = "altColor";
  24. var rowColor = "rowColor";
  25. var tableTab = "tableTab";
  26. var activeTableTab = "activeTableTab";
  27. </script>
  28. <noscript>
  29. <div>JavaScript is disabled on your browser.</div>
  30. </noscript>
  31. <!-- ========= START OF TOP NAVBAR ======= -->
  32. <div class="topNav"><a name="navbar.top">
  33. <!-- -->
  34. </a>
  35. <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
  36. <a name="navbar.top.firstrow">
  37. <!-- -->
  38. </a>
  39. <ul class="navList" title="Navigation">
  40. <li><a href="../../../../overview-summary.html">Overview</a></li>
  41. <li><a href="package-summary.html">Package</a></li>
  42. <li class="navBarCell1Rev">Class</li>
  43. <li><a href="package-tree.html">Tree</a></li>
  44. <li><a href="../../../../deprecated-list.html">Deprecated</a></li>
  45. <li><a href="../../../../index-files/index-1.html">Index</a></li>
  46. <li><a href="../../../../help-doc.html">Help</a></li>
  47. </ul>
  48. </div>
  49. <div class="subNav">
  50. <ul class="navList">
  51. <li><a href="../../../../com/zipcodewilmington/streams/tools/ReflectionUtils.html" title="class in com.zipcodewilmington.streams.tools"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
  52. <li>Next&nbsp;Class</li>
  53. </ul>
  54. <ul class="navList">
  55. <li><a href="../../../../index.html?com/zipcodewilmington/streams/tools/StringUtils.html" target="_top">Frames</a></li>
  56. <li><a href="StringUtils.html" target="_top">No&nbsp;Frames</a></li>
  57. </ul>
  58. <ul class="navList" id="allclasses_navbar_top">
  59. <li><a href="../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
  60. </ul>
  61. <div>
  62. <script type="text/javascript"><!--
  63. allClassesLink = document.getElementById("allclasses_navbar_top");
  64. if(window==top) {
  65. allClassesLink.style.display = "block";
  66. }
  67. else {
  68. allClassesLink.style.display = "none";
  69. }
  70. //-->
  71. </script>
  72. </div>
  73. <div>
  74. <ul class="subNavList">
  75. <li>Summary:&nbsp;</li>
  76. <li>Nested&nbsp;|&nbsp;</li>
  77. <li>Field&nbsp;|&nbsp;</li>
  78. <li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
  79. <li><a href="#method.summary">Method</a></li>
  80. </ul>
  81. <ul class="subNavList">
  82. <li>Detail:&nbsp;</li>
  83. <li>Field&nbsp;|&nbsp;</li>
  84. <li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
  85. <li><a href="#method.detail">Method</a></li>
  86. </ul>
  87. </div>
  88. <a name="skip.navbar.top">
  89. <!-- -->
  90. </a></div>
  91. <!-- ========= END OF TOP NAVBAR ========= -->
  92. <!-- ======== START OF CLASS DATA ======== -->
  93. <div class="header">
  94. <div class="subTitle">com.zipcodewilmington.streams.tools</div>
  95. <h2 title="Class StringUtils" class="title">Class StringUtils</h2>
  96. </div>
  97. <div class="contentContainer">
  98. <ul class="inheritance">
  99. <li>java.lang.Object</li>
  100. <li>
  101. <ul class="inheritance">
  102. <li>com.zipcodewilmington.streams.tools.StringUtils</li>
  103. </ul>
  104. </li>
  105. </ul>
  106. <div class="description">
  107. <ul class="blockList">
  108. <li class="blockList">
  109. <hr>
  110. <br>
  111. <pre>public class <span class="typeNameLabel">StringUtils</span>
  112. extends java.lang.Object</pre>
  113. <div class="block">Created by leon on 5/24/17.</div>
  114. </li>
  115. </ul>
  116. </div>
  117. <div class="summary">
  118. <ul class="blockList">
  119. <li class="blockList">
  120. <!-- ======== CONSTRUCTOR SUMMARY ======== -->
  121. <ul class="blockList">
  122. <li class="blockList"><a name="constructor.summary">
  123. <!-- -->
  124. </a>
  125. <h3>Constructor Summary</h3>
  126. <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
  127. <caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
  128. <tr>
  129. <th class="colOne" scope="col">Constructor and Description</th>
  130. </tr>
  131. <tr class="altColor">
  132. <td class="colOne"><code><span class="memberNameLink"><a href="../../../../com/zipcodewilmington/streams/tools/StringUtils.html#StringUtils--">StringUtils</a></span>()</code>&nbsp;</td>
  133. </tr>
  134. </table>
  135. </li>
  136. </ul>
  137. <!-- ========== METHOD SUMMARY =========== -->
  138. <ul class="blockList">
  139. <li class="blockList"><a name="method.summary">
  140. <!-- -->
  141. </a>
  142. <h3>Method Summary</h3>
  143. <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
  144. <caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
  145. <tr>
  146. <th class="colFirst" scope="col">Modifier and Type</th>
  147. <th class="colLast" scope="col">Method and Description</th>
  148. </tr>
  149. <tr id="i0" class="altColor">
  150. <td class="colFirst"><code>static java.lang.String</code></td>
  151. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/zipcodewilmington/streams/tools/StringUtils.html#capitalizeFirstChar-java.lang.String-">capitalizeFirstChar</a></span>(java.lang.String&nbsp;string)</code>&nbsp;</td>
  152. </tr>
  153. <tr id="i1" class="rowColor">
  154. <td class="colFirst"><code>static java.lang.String</code></td>
  155. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/zipcodewilmington/streams/tools/StringUtils.html#padLeft-java.lang.Object-int-">padLeft</a></span>(java.lang.Object&nbsp;s,
  156. int&nbsp;n)</code>&nbsp;</td>
  157. </tr>
  158. <tr id="i2" class="altColor">
  159. <td class="colFirst"><code>static java.lang.String</code></td>
  160. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/zipcodewilmington/streams/tools/StringUtils.html#padRight-java.lang.String-int-">padRight</a></span>(java.lang.String&nbsp;s,
  161. int&nbsp;n)</code>&nbsp;</td>
  162. </tr>
  163. <tr id="i3" class="rowColor">
  164. <td class="colFirst"><code>static java.lang.String</code></td>
  165. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/zipcodewilmington/streams/tools/StringUtils.html#repeatString-int-java.lang.String-">repeatString</a></span>(int&nbsp;numberOfRepeats,
  166. java.lang.String&nbsp;val)</code>&nbsp;</td>
  167. </tr>
  168. </table>
  169. <ul class="blockList">
  170. <li class="blockList"><a name="methods.inherited.from.class.java.lang.Object">
  171. <!-- -->
  172. </a>
  173. <h3>Methods inherited from class&nbsp;java.lang.Object</h3>
  174. <code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li>
  175. </ul>
  176. </li>
  177. </ul>
  178. </li>
  179. </ul>
  180. </div>
  181. <div class="details">
  182. <ul class="blockList">
  183. <li class="blockList">
  184. <!-- ========= CONSTRUCTOR DETAIL ======== -->
  185. <ul class="blockList">
  186. <li class="blockList"><a name="constructor.detail">
  187. <!-- -->
  188. </a>
  189. <h3>Constructor Detail</h3>
  190. <a name="StringUtils--">
  191. <!-- -->
  192. </a>
  193. <ul class="blockListLast">
  194. <li class="blockList">
  195. <h4>StringUtils</h4>
  196. <pre>public&nbsp;StringUtils()</pre>
  197. </li>
  198. </ul>
  199. </li>
  200. </ul>
  201. <!-- ============ METHOD DETAIL ========== -->
  202. <ul class="blockList">
  203. <li class="blockList"><a name="method.detail">
  204. <!-- -->
  205. </a>
  206. <h3>Method Detail</h3>
  207. <a name="capitalizeFirstChar-java.lang.String-">
  208. <!-- -->
  209. </a>
  210. <ul class="blockList">
  211. <li class="blockList">
  212. <h4>capitalizeFirstChar</h4>
  213. <pre>public static&nbsp;java.lang.String&nbsp;capitalizeFirstChar(java.lang.String&nbsp;string)</pre>
  214. <dl>
  215. <dt><span class="paramLabel">Parameters:</span></dt>
  216. <dd><code>string</code> - - String to capitalize</dd>
  217. <dt><span class="returnLabel">Returns:</span></dt>
  218. <dd>- input String with first character capitalized</dd>
  219. </dl>
  220. </li>
  221. </ul>
  222. <a name="repeatString-int-java.lang.String-">
  223. <!-- -->
  224. </a>
  225. <ul class="blockList">
  226. <li class="blockList">
  227. <h4>repeatString</h4>
  228. <pre>public static&nbsp;java.lang.String&nbsp;repeatString(int&nbsp;numberOfRepeats,
  229. java.lang.String&nbsp;val)</pre>
  230. <dl>
  231. <dt><span class="paramLabel">Parameters:</span></dt>
  232. <dd><code>numberOfRepeats</code> - - number of times to repeat this string</dd>
  233. <dd><code>val</code> - - value of string to repeat</dd>
  234. <dt><span class="returnLabel">Returns:</span></dt>
  235. <dd>- `people` concatenated with itself `numberOfRepeats` times</dd>
  236. </dl>
  237. </li>
  238. </ul>
  239. <a name="padLeft-java.lang.Object-int-">
  240. <!-- -->
  241. </a>
  242. <ul class="blockList">
  243. <li class="blockList">
  244. <h4>padLeft</h4>
  245. <pre>public static&nbsp;java.lang.String&nbsp;padLeft(java.lang.Object&nbsp;s,
  246. int&nbsp;n)</pre>
  247. <dl>
  248. <dt><span class="paramLabel">Parameters:</span></dt>
  249. <dd><code>s</code> - the String to pad</dd>
  250. <dd><code>n</code> - the padding amount</dd>
  251. <dt><span class="returnLabel">Returns:</span></dt>
  252. <dd>the padded-left String</dd>
  253. </dl>
  254. </li>
  255. </ul>
  256. <a name="padRight-java.lang.String-int-">
  257. <!-- -->
  258. </a>
  259. <ul class="blockListLast">
  260. <li class="blockList">
  261. <h4>padRight</h4>
  262. <pre>public static&nbsp;java.lang.String&nbsp;padRight(java.lang.String&nbsp;s,
  263. int&nbsp;n)</pre>
  264. <dl>
  265. <dt><span class="paramLabel">Parameters:</span></dt>
  266. <dd><code>s</code> - the String to pad</dd>
  267. <dd><code>n</code> - the padding amount</dd>
  268. <dt><span class="returnLabel">Returns:</span></dt>
  269. <dd>the padded-left String</dd>
  270. </dl>
  271. </li>
  272. </ul>
  273. </li>
  274. </ul>
  275. </li>
  276. </ul>
  277. </div>
  278. </div>
  279. <!-- ========= END OF CLASS DATA ========= -->
  280. <!-- ======= START OF BOTTOM NAVBAR ====== -->
  281. <div class="bottomNav"><a name="navbar.bottom">
  282. <!-- -->
  283. </a>
  284. <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
  285. <a name="navbar.bottom.firstrow">
  286. <!-- -->
  287. </a>
  288. <ul class="navList" title="Navigation">
  289. <li><a href="../../../../overview-summary.html">Overview</a></li>
  290. <li><a href="package-summary.html">Package</a></li>
  291. <li class="navBarCell1Rev">Class</li>
  292. <li><a href="package-tree.html">Tree</a></li>
  293. <li><a href="../../../../deprecated-list.html">Deprecated</a></li>
  294. <li><a href="../../../../index-files/index-1.html">Index</a></li>
  295. <li><a href="../../../../help-doc.html">Help</a></li>
  296. </ul>
  297. </div>
  298. <div class="subNav">
  299. <ul class="navList">
  300. <li><a href="../../../../com/zipcodewilmington/streams/tools/ReflectionUtils.html" title="class in com.zipcodewilmington.streams.tools"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
  301. <li>Next&nbsp;Class</li>
  302. </ul>
  303. <ul class="navList">
  304. <li><a href="../../../../index.html?com/zipcodewilmington/streams/tools/StringUtils.html" target="_top">Frames</a></li>
  305. <li><a href="StringUtils.html" target="_top">No&nbsp;Frames</a></li>
  306. </ul>
  307. <ul class="navList" id="allclasses_navbar_bottom">
  308. <li><a href="../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
  309. </ul>
  310. <div>
  311. <script type="text/javascript"><!--
  312. allClassesLink = document.getElementById("allclasses_navbar_bottom");
  313. if(window==top) {
  314. allClassesLink.style.display = "block";
  315. }
  316. else {
  317. allClassesLink.style.display = "none";
  318. }
  319. //-->
  320. </script>
  321. </div>
  322. <div>
  323. <ul class="subNavList">
  324. <li>Summary:&nbsp;</li>
  325. <li>Nested&nbsp;|&nbsp;</li>
  326. <li>Field&nbsp;|&nbsp;</li>
  327. <li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
  328. <li><a href="#method.summary">Method</a></li>
  329. </ul>
  330. <ul class="subNavList">
  331. <li>Detail:&nbsp;</li>
  332. <li>Field&nbsp;|&nbsp;</li>
  333. <li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
  334. <li><a href="#method.detail">Method</a></li>
  335. </ul>
  336. </div>
  337. <a name="skip.navbar.bottom">
  338. <!-- -->
  339. </a></div>
  340. <!-- ======== END OF BOTTOM NAVBAR ======= -->
  341. </body>
  342. </html>