PageRenderTime 62ms CodeModel.GetById 13ms RepoModel.GetById 0ms app.codeStats 1ms

/www/tags/NOV_07_2009/htdocs/api/org/gjt/sp/jedit/TextUtilities.html

#
HTML | 1024 lines | 918 code | 92 blank | 14 comment | 0 complexity | ca82c58f85ae779443e50f756ab527c8 MD5 | raw file
Possible License(s): BSD-3-Clause, AGPL-1.0, Apache-2.0, LGPL-2.0, LGPL-3.0, GPL-2.0, CC-BY-SA-3.0, LGPL-2.1, GPL-3.0, MPL-2.0-no-copyleft-exception, IPL-1.0
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2. <!--NewPage-->
  3. <HTML>
  4. <HEAD>
  5. <!-- Generated by javadoc (build 1.5.0_14) on Tue Jul 22 07:13:46 GMT-08:00 2008 -->
  6. <TITLE>
  7. TextUtilities (jEdit API)
  8. </TITLE>
  9. <META NAME="keywords" CONTENT="org.gjt.sp.jedit.TextUtilities class">
  10. <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
  11. <NOSCRIPT>
  12. </NOSCRIPT>
  13. </HEAD>
  14. <BODY BGCOLOR="white" >
  15. <!-- ========= START OF TOP NAVBAR ======= -->
  16. <A NAME="navbar_top"><!-- --></A>
  17. <A HREF="#skip-navbar_top" title="Skip navigation links"></A>
  18. <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
  19. <TR>
  20. <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
  21. <A NAME="navbar_top_firstrow"><!-- --></A>
  22. <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  23. <TR ALIGN="center" VALIGN="top">
  24. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  25. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  26. <TD BGCOLOR="#00008B" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  27. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/TextUtilities.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  28. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  29. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  30. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  31. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  32. </TR>
  33. </TABLE>
  34. </TD>
  35. <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
  36. </EM>
  37. </TD>
  38. </TR>
  39. <TR>
  40. <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  41. &nbsp;<A HREF="../../../../org/gjt/sp/jedit/ServiceManager.ServiceFoldHandlerProvider.html" title="class in org.gjt.sp.jedit"><B>PREV CLASS</B></A>&nbsp;
  42. &nbsp;<A HREF="../../../../org/gjt/sp/jedit/View.html" title="class in org.gjt.sp.jedit"><B>NEXT CLASS</B></A></FONT></TD>
  43. <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  44. <A HREF="../../../../index.html?org/gjt/sp/jedit/TextUtilities.html" target="_top"><B>FRAMES</B></A> &nbsp;
  45. &nbsp;<A HREF="TextUtilities.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
  46. &nbsp;
  47. <NOSCRIPT>
  48. <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
  49. </NOSCRIPT>
  50. </FONT></TD>
  51. </TR>
  52. <TR>
  53. <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  54. SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
  55. <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  56. DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
  57. </TR>
  58. </TABLE>
  59. <A NAME="skip-navbar_top"></A>
  60. <!-- ========= END OF TOP NAVBAR ========= -->
  61. <HR>
  62. <!-- ======== START OF CLASS DATA ======== -->
  63. <H2>
  64. <FONT SIZE="-1">
  65. org.gjt.sp.jedit</FONT>
  66. <BR>
  67. Class TextUtilities</H2>
  68. <PRE>
  69. java.lang.Object
  70. <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>org.gjt.sp.jedit.TextUtilities</B>
  71. </PRE>
  72. <HR>
  73. <DL>
  74. <DT><PRE>public class <B>TextUtilities</B><DT>extends java.lang.Object</DL>
  75. </PRE>
  76. <P>
  77. Contains several text manipulation methods.
  78. <ul>
  79. <li>Bracket matching
  80. <li>Word start and end offset calculation
  81. <li>String comparison
  82. <li>Converting tabs to spaces and vice versa
  83. <li>Wrapping text
  84. <li>String case conversion
  85. </ul>
  86. <P>
  87. <P>
  88. <HR>
  89. <P>
  90. <!-- =========== FIELD SUMMARY =========== -->
  91. <A NAME="field_summary"><!-- --></A>
  92. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  93. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  94. <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
  95. <B>Field Summary</B></FONT></TH>
  96. </TR>
  97. <TR BGCOLOR="white" CLASS="TableRowColor">
  98. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  99. <CODE>static&nbsp;int</CODE></FONT></TD>
  100. <TD><CODE><B><A HREF="../../../../org/gjt/sp/jedit/TextUtilities.html#BRACKET_MATCH_LIMIT">BRACKET_MATCH_LIMIT</A></B></CODE>
  101. <BR>
  102. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
  103. </TR>
  104. <TR BGCOLOR="white" CLASS="TableRowColor">
  105. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  106. <CODE>static&nbsp;int</CODE></FONT></TD>
  107. <TD><CODE><B><A HREF="../../../../org/gjt/sp/jedit/TextUtilities.html#LOWER_CASE">LOWER_CASE</A></B></CODE>
  108. <BR>
  109. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
  110. </TR>
  111. <TR BGCOLOR="white" CLASS="TableRowColor">
  112. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  113. <CODE>static&nbsp;int</CODE></FONT></TD>
  114. <TD><CODE><B><A HREF="../../../../org/gjt/sp/jedit/TextUtilities.html#MIXED">MIXED</A></B></CODE>
  115. <BR>
  116. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
  117. </TR>
  118. <TR BGCOLOR="white" CLASS="TableRowColor">
  119. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  120. <CODE>static&nbsp;int</CODE></FONT></TD>
  121. <TD><CODE><B><A HREF="../../../../org/gjt/sp/jedit/TextUtilities.html#TITLE_CASE">TITLE_CASE</A></B></CODE>
  122. <BR>
  123. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
  124. </TR>
  125. <TR BGCOLOR="white" CLASS="TableRowColor">
  126. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  127. <CODE>static&nbsp;int</CODE></FONT></TD>
  128. <TD><CODE><B><A HREF="../../../../org/gjt/sp/jedit/TextUtilities.html#UPPER_CASE">UPPER_CASE</A></B></CODE>
  129. <BR>
  130. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
  131. </TR>
  132. </TABLE>
  133. &nbsp;
  134. <!-- ======== CONSTRUCTOR SUMMARY ======== -->
  135. <A NAME="constructor_summary"><!-- --></A>
  136. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  137. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  138. <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
  139. <B>Constructor Summary</B></FONT></TH>
  140. </TR>
  141. <TR BGCOLOR="white" CLASS="TableRowColor">
  142. <TD><CODE><B><A HREF="../../../../org/gjt/sp/jedit/TextUtilities.html#TextUtilities()">TextUtilities</A></B>()</CODE>
  143. <BR>
  144. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
  145. </TR>
  146. </TABLE>
  147. &nbsp;
  148. <!-- ========== METHOD SUMMARY =========== -->
  149. <A NAME="method_summary"><!-- --></A>
  150. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  151. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  152. <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
  153. <B>Method Summary</B></FONT></TH>
  154. </TR>
  155. <TR BGCOLOR="white" CLASS="TableRowColor">
  156. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  157. <CODE>static&nbsp;int</CODE></FONT></TD>
  158. <TD><CODE><B><A HREF="../../../../org/gjt/sp/jedit/TextUtilities.html#findMatchingBracket(org.gjt.sp.jedit.buffer.JEditBuffer, int, int)">findMatchingBracket</A></B>(<A HREF="../../../../org/gjt/sp/jedit/buffer/JEditBuffer.html" title="class in org.gjt.sp.jedit.buffer">JEditBuffer</A>&nbsp;buffer,
  159. int&nbsp;line,
  160. int&nbsp;offset)</CODE>
  161. <BR>
  162. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the offset of the bracket matching the one at the
  163. specified offset of the buffer, or -1 if the bracket is
  164. unmatched (or if the character is not a bracket).</TD>
  165. </TR>
  166. <TR BGCOLOR="white" CLASS="TableRowColor">
  167. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  168. <CODE>static&nbsp;int</CODE></FONT></TD>
  169. <TD><CODE><B><A HREF="../../../../org/gjt/sp/jedit/TextUtilities.html#findWordEnd(java.lang.CharSequence, int, java.lang.String)">findWordEnd</A></B>(java.lang.CharSequence&nbsp;line,
  170. int&nbsp;pos,
  171. java.lang.String&nbsp;noWordSep)</CODE>
  172. <BR>
  173. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Locates the end of the word at the specified position.</TD>
  174. </TR>
  175. <TR BGCOLOR="white" CLASS="TableRowColor">
  176. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  177. <CODE>static&nbsp;int</CODE></FONT></TD>
  178. <TD><CODE><B><A HREF="../../../../org/gjt/sp/jedit/TextUtilities.html#findWordEnd(java.lang.CharSequence, int, java.lang.String, boolean, boolean, boolean)">findWordEnd</A></B>(java.lang.CharSequence&nbsp;line,
  179. int&nbsp;pos,
  180. java.lang.String&nbsp;noWordSep,
  181. boolean&nbsp;joinNonWordChars,
  182. boolean&nbsp;camelCasedWords,
  183. boolean&nbsp;eatWhitespace)</CODE>
  184. <BR>
  185. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Locates the end of the word at the specified position.</TD>
  186. </TR>
  187. <TR BGCOLOR="white" CLASS="TableRowColor">
  188. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  189. <CODE>static&nbsp;int</CODE></FONT></TD>
  190. <TD><CODE><B><A HREF="../../../../org/gjt/sp/jedit/TextUtilities.html#findWordEnd(java.lang.String, int, java.lang.String)">findWordEnd</A></B>(java.lang.String&nbsp;line,
  191. int&nbsp;pos,
  192. java.lang.String&nbsp;noWordSep)</CODE>
  193. <BR>
  194. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Locates the end of the word at the specified position.</TD>
  195. </TR>
  196. <TR BGCOLOR="white" CLASS="TableRowColor">
  197. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  198. <CODE>static&nbsp;int</CODE></FONT></TD>
  199. <TD><CODE><B><A HREF="../../../../org/gjt/sp/jedit/TextUtilities.html#findWordEnd(java.lang.String, int, java.lang.String, boolean)">findWordEnd</A></B>(java.lang.String&nbsp;line,
  200. int&nbsp;pos,
  201. java.lang.String&nbsp;noWordSep,
  202. boolean&nbsp;joinNonWordChars)</CODE>
  203. <BR>
  204. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Locates the end of the word at the specified position.</TD>
  205. </TR>
  206. <TR BGCOLOR="white" CLASS="TableRowColor">
  207. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  208. <CODE>static&nbsp;int</CODE></FONT></TD>
  209. <TD><CODE><B><A HREF="../../../../org/gjt/sp/jedit/TextUtilities.html#findWordEnd(java.lang.String, int, java.lang.String, boolean, boolean)">findWordEnd</A></B>(java.lang.String&nbsp;line,
  210. int&nbsp;pos,
  211. java.lang.String&nbsp;noWordSep,
  212. boolean&nbsp;joinNonWordChars,
  213. boolean&nbsp;eatWhitespace)</CODE>
  214. <BR>
  215. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Locates the end of the word at the specified position.</TD>
  216. </TR>
  217. <TR BGCOLOR="white" CLASS="TableRowColor">
  218. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  219. <CODE>static&nbsp;int</CODE></FONT></TD>
  220. <TD><CODE><B><A HREF="../../../../org/gjt/sp/jedit/TextUtilities.html#findWordEnd(java.lang.String, int, java.lang.String, boolean, boolean, boolean)">findWordEnd</A></B>(java.lang.String&nbsp;line,
  221. int&nbsp;pos,
  222. java.lang.String&nbsp;noWordSep,
  223. boolean&nbsp;joinNonWordChars,
  224. boolean&nbsp;camelCasedWords,
  225. boolean&nbsp;eatWhitespace)</CODE>
  226. <BR>
  227. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Locates the end of the word at the specified position.</TD>
  228. </TR>
  229. <TR BGCOLOR="white" CLASS="TableRowColor">
  230. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  231. <CODE>static&nbsp;int</CODE></FONT></TD>
  232. <TD><CODE><B><A HREF="../../../../org/gjt/sp/jedit/TextUtilities.html#findWordStart(java.lang.CharSequence, int, java.lang.String)">findWordStart</A></B>(java.lang.CharSequence&nbsp;line,
  233. int&nbsp;pos,
  234. java.lang.String&nbsp;noWordSep)</CODE>
  235. <BR>
  236. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Locates the start of the word at the specified position.</TD>
  237. </TR>
  238. <TR BGCOLOR="white" CLASS="TableRowColor">
  239. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  240. <CODE>static&nbsp;int</CODE></FONT></TD>
  241. <TD><CODE><B><A HREF="../../../../org/gjt/sp/jedit/TextUtilities.html#findWordStart(java.lang.CharSequence, int, java.lang.String, boolean, boolean, boolean)">findWordStart</A></B>(java.lang.CharSequence&nbsp;line,
  242. int&nbsp;pos,
  243. java.lang.String&nbsp;noWordSep,
  244. boolean&nbsp;joinNonWordChars,
  245. boolean&nbsp;camelCasedWords,
  246. boolean&nbsp;eatWhitespace)</CODE>
  247. <BR>
  248. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Locates the start of the word at the specified position.</TD>
  249. </TR>
  250. <TR BGCOLOR="white" CLASS="TableRowColor">
  251. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  252. <CODE>static&nbsp;int</CODE></FONT></TD>
  253. <TD><CODE><B><A HREF="../../../../org/gjt/sp/jedit/TextUtilities.html#findWordStart(java.lang.String, int, java.lang.String)">findWordStart</A></B>(java.lang.String&nbsp;line,
  254. int&nbsp;pos,
  255. java.lang.String&nbsp;noWordSep)</CODE>
  256. <BR>
  257. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Locates the start of the word at the specified position.</TD>
  258. </TR>
  259. <TR BGCOLOR="white" CLASS="TableRowColor">
  260. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  261. <CODE>static&nbsp;int</CODE></FONT></TD>
  262. <TD><CODE><B><A HREF="../../../../org/gjt/sp/jedit/TextUtilities.html#findWordStart(java.lang.String, int, java.lang.String, boolean)">findWordStart</A></B>(java.lang.String&nbsp;line,
  263. int&nbsp;pos,
  264. java.lang.String&nbsp;noWordSep,
  265. boolean&nbsp;joinNonWordChars)</CODE>
  266. <BR>
  267. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Locates the start of the word at the specified position.</TD>
  268. </TR>
  269. <TR BGCOLOR="white" CLASS="TableRowColor">
  270. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  271. <CODE>static&nbsp;int</CODE></FONT></TD>
  272. <TD><CODE><B><A HREF="../../../../org/gjt/sp/jedit/TextUtilities.html#findWordStart(java.lang.String, int, java.lang.String, boolean, boolean)">findWordStart</A></B>(java.lang.String&nbsp;line,
  273. int&nbsp;pos,
  274. java.lang.String&nbsp;noWordSep,
  275. boolean&nbsp;joinNonWordChars,
  276. boolean&nbsp;eatWhitespace)</CODE>
  277. <BR>
  278. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Locates the start of the word at the specified position.</TD>
  279. </TR>
  280. <TR BGCOLOR="white" CLASS="TableRowColor">
  281. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  282. <CODE>static&nbsp;int</CODE></FONT></TD>
  283. <TD><CODE><B><A HREF="../../../../org/gjt/sp/jedit/TextUtilities.html#findWordStart(java.lang.String, int, java.lang.String, boolean, boolean, boolean)">findWordStart</A></B>(java.lang.String&nbsp;line,
  284. int&nbsp;pos,
  285. java.lang.String&nbsp;noWordSep,
  286. boolean&nbsp;joinNonWordChars,
  287. boolean&nbsp;camelCasedWords,
  288. boolean&nbsp;eatWhitespace)</CODE>
  289. <BR>
  290. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Locates the start of the word at the specified position.</TD>
  291. </TR>
  292. <TR BGCOLOR="white" CLASS="TableRowColor">
  293. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  294. <CODE>static&nbsp;java.lang.String</CODE></FONT></TD>
  295. <TD><CODE><B><A HREF="../../../../org/gjt/sp/jedit/TextUtilities.html#format(java.lang.String, int, int)">format</A></B>(java.lang.String&nbsp;text,
  296. int&nbsp;maxLineLength,
  297. int&nbsp;tabSize)</CODE>
  298. <BR>
  299. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Formats the specified text by merging and breaking lines to the
  300. specified width.</TD>
  301. </TR>
  302. <TR BGCOLOR="white" CLASS="TableRowColor">
  303. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  304. <CODE>static&nbsp;char</CODE></FONT></TD>
  305. <TD><CODE><B><A HREF="../../../../org/gjt/sp/jedit/TextUtilities.html#getComplementaryBracket(char, boolean[])">getComplementaryBracket</A></B>(char&nbsp;ch,
  306. boolean[]&nbsp;direction)</CODE>
  307. <BR>
  308. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Given an opening bracket, return the corresponding closing bracket
  309. and store true in <code>direction[0]</code>.</TD>
  310. </TR>
  311. <TR BGCOLOR="white" CLASS="TableRowColor">
  312. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  313. <CODE>static&nbsp;int</CODE></FONT></TD>
  314. <TD><CODE><B><A HREF="../../../../org/gjt/sp/jedit/TextUtilities.html#getStringCase(java.lang.String)">getStringCase</A></B>(java.lang.String&nbsp;str)</CODE>
  315. <BR>
  316. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns if the specified string is all upper case, all lower case,
  317. or title case (first letter upper case, rest lower case).</TD>
  318. </TR>
  319. <TR BGCOLOR="white" CLASS="TableRowColor">
  320. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  321. <CODE>static&nbsp;<A HREF="../../../../org/gjt/sp/jedit/syntax/Token.html" title="class in org.gjt.sp.jedit.syntax">Token</A></CODE></FONT></TD>
  322. <TD><CODE><B><A HREF="../../../../org/gjt/sp/jedit/TextUtilities.html#getTokenAtOffset(org.gjt.sp.jedit.syntax.Token, int)">getTokenAtOffset</A></B>(<A HREF="../../../../org/gjt/sp/jedit/syntax/Token.html" title="class in org.gjt.sp.jedit.syntax">Token</A>&nbsp;tokens,
  323. int&nbsp;offset)</CODE>
  324. <BR>
  325. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the token that contains the specified offset.</TD>
  326. </TR>
  327. <TR BGCOLOR="white" CLASS="TableRowColor">
  328. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  329. <CODE>static&nbsp;int</CODE></FONT></TD>
  330. <TD><CODE><B><A HREF="../../../../org/gjt/sp/jedit/TextUtilities.html#ignoringWhitespaceIndex(java.lang.String, int)">ignoringWhitespaceIndex</A></B>(java.lang.String&nbsp;str,
  331. int&nbsp;index)</CODE>
  332. <BR>
  333. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Inverse of <code>indexIgnoringWhitespace()</code>.</TD>
  334. </TR>
  335. <TR BGCOLOR="white" CLASS="TableRowColor">
  336. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  337. <CODE>static&nbsp;int</CODE></FONT></TD>
  338. <TD><CODE><B><A HREF="../../../../org/gjt/sp/jedit/TextUtilities.html#indexIgnoringWhitespace(java.lang.String, int)">indexIgnoringWhitespace</A></B>(java.lang.String&nbsp;str,
  339. int&nbsp;index)</CODE>
  340. <BR>
  341. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Inverse of <code>ignoringWhitespaceIndex()</code>.</TD>
  342. </TR>
  343. <TR BGCOLOR="white" CLASS="TableRowColor">
  344. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  345. <CODE>static&nbsp;void</CODE></FONT></TD>
  346. <TD><CODE><B><A HREF="../../../../org/gjt/sp/jedit/TextUtilities.html#indexIgnoringWhitespace(java.lang.String, int, int, java.lang.StringBuffer)">indexIgnoringWhitespace</A></B>(java.lang.String&nbsp;text,
  347. int&nbsp;maxLineLength,
  348. int&nbsp;tabSize,
  349. java.lang.StringBuffer&nbsp;buf)</CODE>
  350. <BR>
  351. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
  352. </TR>
  353. <TR BGCOLOR="white" CLASS="TableRowColor">
  354. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  355. <CODE>static&nbsp;java.lang.String</CODE></FONT></TD>
  356. <TD><CODE><B><A HREF="../../../../org/gjt/sp/jedit/TextUtilities.html#join(java.util.Collection, java.lang.String)">join</A></B>(java.util.Collection&nbsp;c,
  357. java.lang.String&nbsp;delim)</CODE>
  358. <BR>
  359. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Similar to perl's join() method on lists,
  360. but works with all collections.</TD>
  361. </TR>
  362. <TR BGCOLOR="white" CLASS="TableRowColor">
  363. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  364. <CODE>static&nbsp;java.lang.String</CODE></FONT></TD>
  365. <TD><CODE><B><A HREF="../../../../org/gjt/sp/jedit/TextUtilities.html#spacesToTabs(java.lang.String, int)">spacesToTabs</A></B>(java.lang.String&nbsp;in,
  366. int&nbsp;tabSize)</CODE>
  367. <BR>
  368. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Converts consecutive spaces to tabs in the specified string.</TD>
  369. </TR>
  370. <TR BGCOLOR="white" CLASS="TableRowColor">
  371. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  372. <CODE>static&nbsp;java.lang.String</CODE></FONT></TD>
  373. <TD><CODE><B><A HREF="../../../../org/gjt/sp/jedit/TextUtilities.html#tabsToSpaces(java.lang.String, int)">tabsToSpaces</A></B>(java.lang.String&nbsp;in,
  374. int&nbsp;tabSize)</CODE>
  375. <BR>
  376. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Converts tabs to consecutive spaces in the specified string.</TD>
  377. </TR>
  378. <TR BGCOLOR="white" CLASS="TableRowColor">
  379. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  380. <CODE>static&nbsp;java.lang.String</CODE></FONT></TD>
  381. <TD><CODE><B><A HREF="../../../../org/gjt/sp/jedit/TextUtilities.html#toTitleCase(java.lang.String)">toTitleCase</A></B>(java.lang.String&nbsp;str)</CODE>
  382. <BR>
  383. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Converts the specified string to title case, by capitalizing the
  384. first letter.</TD>
  385. </TR>
  386. </TABLE>
  387. &nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
  388. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  389. <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
  390. <TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
  391. </TR>
  392. <TR BGCOLOR="white" CLASS="TableRowColor">
  393. <TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
  394. </TR>
  395. </TABLE>
  396. &nbsp;
  397. <P>
  398. <!-- ============ FIELD DETAIL =========== -->
  399. <A NAME="field_detail"><!-- --></A>
  400. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  401. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  402. <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
  403. <B>Field Detail</B></FONT></TH>
  404. </TR>
  405. </TABLE>
  406. <A NAME="BRACKET_MATCH_LIMIT"><!-- --></A><H3>
  407. BRACKET_MATCH_LIMIT</H3>
  408. <PRE>
  409. public static final int <B>BRACKET_MATCH_LIMIT</B></PRE>
  410. <DL>
  411. <DL>
  412. <DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#org.gjt.sp.jedit.TextUtilities.BRACKET_MATCH_LIMIT">Constant Field Values</A></DL>
  413. </DL>
  414. <HR>
  415. <A NAME="MIXED"><!-- --></A><H3>
  416. MIXED</H3>
  417. <PRE>
  418. public static final int <B>MIXED</B></PRE>
  419. <DL>
  420. <DL>
  421. <DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#org.gjt.sp.jedit.TextUtilities.MIXED">Constant Field Values</A></DL>
  422. </DL>
  423. <HR>
  424. <A NAME="LOWER_CASE"><!-- --></A><H3>
  425. LOWER_CASE</H3>
  426. <PRE>
  427. public static final int <B>LOWER_CASE</B></PRE>
  428. <DL>
  429. <DL>
  430. <DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#org.gjt.sp.jedit.TextUtilities.LOWER_CASE">Constant Field Values</A></DL>
  431. </DL>
  432. <HR>
  433. <A NAME="UPPER_CASE"><!-- --></A><H3>
  434. UPPER_CASE</H3>
  435. <PRE>
  436. public static final int <B>UPPER_CASE</B></PRE>
  437. <DL>
  438. <DL>
  439. <DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#org.gjt.sp.jedit.TextUtilities.UPPER_CASE">Constant Field Values</A></DL>
  440. </DL>
  441. <HR>
  442. <A NAME="TITLE_CASE"><!-- --></A><H3>
  443. TITLE_CASE</H3>
  444. <PRE>
  445. public static final int <B>TITLE_CASE</B></PRE>
  446. <DL>
  447. <DL>
  448. <DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#org.gjt.sp.jedit.TextUtilities.TITLE_CASE">Constant Field Values</A></DL>
  449. </DL>
  450. <!-- ========= CONSTRUCTOR DETAIL ======== -->
  451. <A NAME="constructor_detail"><!-- --></A>
  452. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  453. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  454. <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
  455. <B>Constructor Detail</B></FONT></TH>
  456. </TR>
  457. </TABLE>
  458. <A NAME="TextUtilities()"><!-- --></A><H3>
  459. TextUtilities</H3>
  460. <PRE>
  461. public <B>TextUtilities</B>()</PRE>
  462. <DL>
  463. </DL>
  464. <!-- ============ METHOD DETAIL ========== -->
  465. <A NAME="method_detail"><!-- --></A>
  466. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  467. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  468. <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
  469. <B>Method Detail</B></FONT></TH>
  470. </TR>
  471. </TABLE>
  472. <A NAME="getTokenAtOffset(org.gjt.sp.jedit.syntax.Token, int)"><!-- --></A><H3>
  473. getTokenAtOffset</H3>
  474. <PRE>
  475. public static <A HREF="../../../../org/gjt/sp/jedit/syntax/Token.html" title="class in org.gjt.sp.jedit.syntax">Token</A> <B>getTokenAtOffset</B>(<A HREF="../../../../org/gjt/sp/jedit/syntax/Token.html" title="class in org.gjt.sp.jedit.syntax">Token</A>&nbsp;tokens,
  476. int&nbsp;offset)</PRE>
  477. <DL>
  478. <DD>Returns the token that contains the specified offset.
  479. <P>
  480. <DD><DL>
  481. <DT><B>Parameters:</B><DD><CODE>tokens</CODE> - The token list<DD><CODE>offset</CODE> - The offset<DT><B>Since:</B></DT>
  482. <DD>jEdit 4.0pre3</DD>
  483. </DL>
  484. </DD>
  485. </DL>
  486. <HR>
  487. <A NAME="getComplementaryBracket(char, boolean[])"><!-- --></A><H3>
  488. getComplementaryBracket</H3>
  489. <PRE>
  490. public static char <B>getComplementaryBracket</B>(char&nbsp;ch,
  491. boolean[]&nbsp;direction)</PRE>
  492. <DL>
  493. <DD>Given an opening bracket, return the corresponding closing bracket
  494. and store true in <code>direction[0]</code>. Given a closing bracket,
  495. return the corresponding opening bracket and store false in
  496. <code>direction[0]</code>. Otherwise, return <code>\0</code>.
  497. <P>
  498. <DD><DL>
  499. <DT><B>Since:</B></DT>
  500. <DD>jEdit 4.3pre2</DD>
  501. </DL>
  502. </DD>
  503. </DL>
  504. <HR>
  505. <A NAME="findMatchingBracket(org.gjt.sp.jedit.buffer.JEditBuffer, int, int)"><!-- --></A><H3>
  506. findMatchingBracket</H3>
  507. <PRE>
  508. public static int <B>findMatchingBracket</B>(<A HREF="../../../../org/gjt/sp/jedit/buffer/JEditBuffer.html" title="class in org.gjt.sp.jedit.buffer">JEditBuffer</A>&nbsp;buffer,
  509. int&nbsp;line,
  510. int&nbsp;offset)</PRE>
  511. <DL>
  512. <DD>Returns the offset of the bracket matching the one at the
  513. specified offset of the buffer, or -1 if the bracket is
  514. unmatched (or if the character is not a bracket).
  515. <P>
  516. <DD><DL>
  517. <DT><B>Parameters:</B><DD><CODE>buffer</CODE> - The buffer<DD><CODE>line</CODE> - The line<DD><CODE>offset</CODE> - The offset within that line<DT><B>Since:</B></DT>
  518. <DD>jEdit 2.6pre1</DD>
  519. </DL>
  520. </DD>
  521. </DL>
  522. <HR>
  523. <A NAME="findWordStart(java.lang.String, int, java.lang.String)"><!-- --></A><H3>
  524. findWordStart</H3>
  525. <PRE>
  526. public static int <B>findWordStart</B>(java.lang.String&nbsp;line,
  527. int&nbsp;pos,
  528. java.lang.String&nbsp;noWordSep)</PRE>
  529. <DL>
  530. <DD>Locates the start of the word at the specified position.
  531. <P>
  532. <DD><DL>
  533. <DT><B>Parameters:</B><DD><CODE>line</CODE> - The text<DD><CODE>pos</CODE> - The position<DD><CODE>noWordSep</CODE> - Characters that are non-alphanumeric, but
  534. should be treated as word characters anyway</DL>
  535. </DD>
  536. </DL>
  537. <HR>
  538. <A NAME="findWordStart(java.lang.CharSequence, int, java.lang.String)"><!-- --></A><H3>
  539. findWordStart</H3>
  540. <PRE>
  541. public static int <B>findWordStart</B>(java.lang.CharSequence&nbsp;line,
  542. int&nbsp;pos,
  543. java.lang.String&nbsp;noWordSep)</PRE>
  544. <DL>
  545. <DD>Locates the start of the word at the specified position.
  546. <P>
  547. <DD><DL>
  548. <DT><B>Parameters:</B><DD><CODE>line</CODE> - The text<DD><CODE>pos</CODE> - The position<DD><CODE>noWordSep</CODE> - Characters that are non-alphanumeric, but
  549. should be treated as word characters anyway<DT><B>Since:</B></DT>
  550. <DD>jEdit 4.3pre15</DD>
  551. </DL>
  552. </DD>
  553. </DL>
  554. <HR>
  555. <A NAME="join(java.util.Collection, java.lang.String)"><!-- --></A><H3>
  556. join</H3>
  557. <PRE>
  558. public static java.lang.String <B>join</B>(java.util.Collection&nbsp;c,
  559. java.lang.String&nbsp;delim)</PRE>
  560. <DL>
  561. <DD>Similar to perl's join() method on lists,
  562. but works with all collections.
  563. <P>
  564. <DD><DL>
  565. <DT><B>Parameters:</B><DD><CODE>c</CODE> - An iterable collection of Objects<DD><CODE>delim</CODE> - a string to put between each object
  566. <DT><B>Returns:</B><DD>a joined toString() representation of the collection<DT><B>Since:</B></DT>
  567. <DD>jedit 4.3pre3</DD>
  568. </DL>
  569. </DD>
  570. </DL>
  571. <HR>
  572. <A NAME="findWordStart(java.lang.String, int, java.lang.String, boolean)"><!-- --></A><H3>
  573. findWordStart</H3>
  574. <PRE>
  575. public static int <B>findWordStart</B>(java.lang.String&nbsp;line,
  576. int&nbsp;pos,
  577. java.lang.String&nbsp;noWordSep,
  578. boolean&nbsp;joinNonWordChars)</PRE>
  579. <DL>
  580. <DD>Locates the start of the word at the specified position.
  581. <P>
  582. <DD><DL>
  583. <DT><B>Parameters:</B><DD><CODE>line</CODE> - The text<DD><CODE>pos</CODE> - The position<DD><CODE>noWordSep</CODE> - Characters that are non-alphanumeric, but
  584. should be treated as word characters anyway<DD><CODE>joinNonWordChars</CODE> - Treat consecutive non-alphanumeric
  585. characters as one word<DT><B>Since:</B></DT>
  586. <DD>jEdit 4.2pre5</DD>
  587. </DL>
  588. </DD>
  589. </DL>
  590. <HR>
  591. <A NAME="findWordStart(java.lang.String, int, java.lang.String, boolean, boolean)"><!-- --></A><H3>
  592. findWordStart</H3>
  593. <PRE>
  594. public static int <B>findWordStart</B>(java.lang.String&nbsp;line,
  595. int&nbsp;pos,
  596. java.lang.String&nbsp;noWordSep,
  597. boolean&nbsp;joinNonWordChars,
  598. boolean&nbsp;eatWhitespace)</PRE>
  599. <DL>
  600. <DD>Locates the start of the word at the specified position.
  601. <P>
  602. <DD><DL>
  603. <DT><B>Parameters:</B><DD><CODE>line</CODE> - The text<DD><CODE>pos</CODE> - The position<DD><CODE>noWordSep</CODE> - Characters that are non-alphanumeric, but
  604. should be treated as word characters anyway<DD><CODE>joinNonWordChars</CODE> - Treat consecutive non-alphanumeric
  605. characters as one word<DD><CODE>eatWhitespace</CODE> - Include whitespace at start of word<DT><B>Since:</B></DT>
  606. <DD>jEdit 4.1pre2</DD>
  607. </DL>
  608. </DD>
  609. </DL>
  610. <HR>
  611. <A NAME="findWordStart(java.lang.String, int, java.lang.String, boolean, boolean, boolean)"><!-- --></A><H3>
  612. findWordStart</H3>
  613. <PRE>
  614. public static int <B>findWordStart</B>(java.lang.String&nbsp;line,
  615. int&nbsp;pos,
  616. java.lang.String&nbsp;noWordSep,
  617. boolean&nbsp;joinNonWordChars,
  618. boolean&nbsp;camelCasedWords,
  619. boolean&nbsp;eatWhitespace)</PRE>
  620. <DL>
  621. <DD>Locates the start of the word at the specified position.
  622. <P>
  623. <DD><DL>
  624. <DT><B>Parameters:</B><DD><CODE>line</CODE> - The text<DD><CODE>pos</CODE> - The position<DD><CODE>noWordSep</CODE> - Characters that are non-alphanumeric, but
  625. should be treated as word characters anyway<DD><CODE>joinNonWordChars</CODE> - Treat consecutive non-alphanumeric
  626. characters as one word<DD><CODE>camelCasedWords</CODE> - Treat "camelCased" parts as words<DD><CODE>eatWhitespace</CODE> - Include whitespace at start of word<DT><B>Since:</B></DT>
  627. <DD>jEdit 4.3pre10</DD>
  628. </DL>
  629. </DD>
  630. </DL>
  631. <HR>
  632. <A NAME="findWordStart(java.lang.CharSequence, int, java.lang.String, boolean, boolean, boolean)"><!-- --></A><H3>
  633. findWordStart</H3>
  634. <PRE>
  635. public static int <B>findWordStart</B>(java.lang.CharSequence&nbsp;line,
  636. int&nbsp;pos,
  637. java.lang.String&nbsp;noWordSep,
  638. boolean&nbsp;joinNonWordChars,
  639. boolean&nbsp;camelCasedWords,
  640. boolean&nbsp;eatWhitespace)</PRE>
  641. <DL>
  642. <DD>Locates the start of the word at the specified position.
  643. <P>
  644. <DD><DL>
  645. <DT><B>Parameters:</B><DD><CODE>line</CODE> - The text<DD><CODE>pos</CODE> - The position<DD><CODE>noWordSep</CODE> - Characters that are non-alphanumeric, but
  646. should be treated as word characters anyway<DD><CODE>joinNonWordChars</CODE> - Treat consecutive non-alphanumeric
  647. characters as one word<DD><CODE>camelCasedWords</CODE> - Treat "camelCased" parts as words<DD><CODE>eatWhitespace</CODE> - Include whitespace at start of word<DT><B>Since:</B></DT>
  648. <DD>jEdit 4.3pre15</DD>
  649. </DL>
  650. </DD>
  651. </DL>
  652. <HR>
  653. <A NAME="findWordEnd(java.lang.String, int, java.lang.String)"><!-- --></A><H3>
  654. findWordEnd</H3>
  655. <PRE>
  656. public static int <B>findWordEnd</B>(java.lang.String&nbsp;line,
  657. int&nbsp;pos,
  658. java.lang.String&nbsp;noWordSep)</PRE>
  659. <DL>
  660. <DD>Locates the end of the word at the specified position.
  661. <P>
  662. <DD><DL>
  663. <DT><B>Parameters:</B><DD><CODE>line</CODE> - The text<DD><CODE>pos</CODE> - The position<DD><CODE>noWordSep</CODE> - Characters that are non-alphanumeric, but
  664. should be treated as word characters anyway</DL>
  665. </DD>
  666. </DL>
  667. <HR>
  668. <A NAME="findWordEnd(java.lang.CharSequence, int, java.lang.String)"><!-- --></A><H3>
  669. findWordEnd</H3>
  670. <PRE>
  671. public static int <B>findWordEnd</B>(java.lang.CharSequence&nbsp;line,
  672. int&nbsp;pos,
  673. java.lang.String&nbsp;noWordSep)</PRE>
  674. <DL>
  675. <DD>Locates the end of the word at the specified position.
  676. <P>
  677. <DD><DL>
  678. <DT><B>Parameters:</B><DD><CODE>line</CODE> - The text<DD><CODE>pos</CODE> - The position<DD><CODE>noWordSep</CODE> - Characters that are non-alphanumeric, but
  679. should be treated as word characters anyway<DT><B>Since:</B></DT>
  680. <DD>jEdit 4.3pre15</DD>
  681. </DL>
  682. </DD>
  683. </DL>
  684. <HR>
  685. <A NAME="findWordEnd(java.lang.String, int, java.lang.String, boolean)"><!-- --></A><H3>
  686. findWordEnd</H3>
  687. <PRE>
  688. public static int <B>findWordEnd</B>(java.lang.String&nbsp;line,
  689. int&nbsp;pos,
  690. java.lang.String&nbsp;noWordSep,
  691. boolean&nbsp;joinNonWordChars)</PRE>
  692. <DL>
  693. <DD>Locates the end of the word at the specified position.
  694. <P>
  695. <DD><DL>
  696. <DT><B>Parameters:</B><DD><CODE>line</CODE> - The text<DD><CODE>pos</CODE> - The position<DD><CODE>noWordSep</CODE> - Characters that are non-alphanumeric, but
  697. should be treated as word characters anyway<DD><CODE>joinNonWordChars</CODE> - Treat consecutive non-alphanumeric
  698. characters as one word<DT><B>Since:</B></DT>
  699. <DD>jEdit 4.1pre2</DD>
  700. </DL>
  701. </DD>
  702. </DL>
  703. <HR>
  704. <A NAME="findWordEnd(java.lang.String, int, java.lang.String, boolean, boolean)"><!-- --></A><H3>
  705. findWordEnd</H3>
  706. <PRE>
  707. public static int <B>findWordEnd</B>(java.lang.String&nbsp;line,
  708. int&nbsp;pos,
  709. java.lang.String&nbsp;noWordSep,
  710. boolean&nbsp;joinNonWordChars,
  711. boolean&nbsp;eatWhitespace)</PRE>
  712. <DL>
  713. <DD>Locates the end of the word at the specified position.
  714. <P>
  715. <DD><DL>
  716. <DT><B>Parameters:</B><DD><CODE>line</CODE> - The text<DD><CODE>pos</CODE> - The position<DD><CODE>noWordSep</CODE> - Characters that are non-alphanumeric, but
  717. should be treated as word characters anyway<DD><CODE>joinNonWordChars</CODE> - Treat consecutive non-alphanumeric
  718. characters as one word<DD><CODE>eatWhitespace</CODE> - Include whitespace at end of word<DT><B>Since:</B></DT>
  719. <DD>jEdit 4.2pre5</DD>
  720. </DL>
  721. </DD>
  722. </DL>
  723. <HR>
  724. <A NAME="findWordEnd(java.lang.String, int, java.lang.String, boolean, boolean, boolean)"><!-- --></A><H3>
  725. findWordEnd</H3>
  726. <PRE>
  727. public static int <B>findWordEnd</B>(java.lang.String&nbsp;line,
  728. int&nbsp;pos,
  729. java.lang.String&nbsp;noWordSep,
  730. boolean&nbsp;joinNonWordChars,
  731. boolean&nbsp;camelCasedWords,
  732. boolean&nbsp;eatWhitespace)</PRE>
  733. <DL>
  734. <DD>Locates the end of the word at the specified position.
  735. <P>
  736. <DD><DL>
  737. <DT><B>Parameters:</B><DD><CODE>line</CODE> - The text<DD><CODE>pos</CODE> - The position<DD><CODE>noWordSep</CODE> - Characters that are non-alphanumeric, but
  738. should be treated as word characters anyway<DD><CODE>joinNonWordChars</CODE> - Treat consecutive non-alphanumeric
  739. characters as one word<DD><CODE>camelCasedWords</CODE> - Treat "camelCased" parts as words<DD><CODE>eatWhitespace</CODE> - Include whitespace at end of word<DT><B>Since:</B></DT>
  740. <DD>jEdit 4.3pre10</DD>
  741. </DL>
  742. </DD>
  743. </DL>
  744. <HR>
  745. <A NAME="findWordEnd(java.lang.CharSequence, int, java.lang.String, boolean, boolean, boolean)"><!-- --></A><H3>
  746. findWordEnd</H3>
  747. <PRE>
  748. public static int <B>findWordEnd</B>(java.lang.CharSequence&nbsp;line,
  749. int&nbsp;pos,
  750. java.lang.String&nbsp;noWordSep,
  751. boolean&nbsp;joinNonWordChars,
  752. boolean&nbsp;camelCasedWords,
  753. boolean&nbsp;eatWhitespace)</PRE>
  754. <DL>
  755. <DD>Locates the end of the word at the specified position.
  756. <P>
  757. <DD><DL>
  758. <DT><B>Parameters:</B><DD><CODE>line</CODE> - The text<DD><CODE>pos</CODE> - The position<DD><CODE>noWordSep</CODE> - Characters that are non-alphanumeric, but
  759. should be treated as word characters anyway<DD><CODE>joinNonWordChars</CODE> - Treat consecutive non-alphanumeric
  760. characters as one word<DD><CODE>camelCasedWords</CODE> - Treat "camelCased" parts as words<DD><CODE>eatWhitespace</CODE> - Include whitespace at end of word<DT><B>Since:</B></DT>
  761. <DD>jEdit 4.3pre15</DD>
  762. </DL>
  763. </DD>
  764. </DL>
  765. <HR>
  766. <A NAME="spacesToTabs(java.lang.String, int)"><!-- --></A><H3>
  767. spacesToTabs</H3>
  768. <PRE>
  769. public static java.lang.String <B>spacesToTabs</B>(java.lang.String&nbsp;in,
  770. int&nbsp;tabSize)</PRE>
  771. <DL>
  772. <DD>Converts consecutive spaces to tabs in the specified string.
  773. <P>
  774. <DD><DL>
  775. <DT><B>Parameters:</B><DD><CODE>in</CODE> - The string<DD><CODE>tabSize</CODE> - The tab size</DL>
  776. </DD>
  777. </DL>
  778. <HR>
  779. <A NAME="tabsToSpaces(java.lang.String, int)"><!-- --></A><H3>
  780. tabsToSpaces</H3>
  781. <PRE>
  782. public static java.lang.String <B>tabsToSpaces</B>(java.lang.String&nbsp;in,
  783. int&nbsp;tabSize)</PRE>
  784. <DL>
  785. <DD>Converts tabs to consecutive spaces in the specified string.
  786. <P>
  787. <DD><DL>
  788. <DT><B>Parameters:</B><DD><CODE>in</CODE> - The string<DD><CODE>tabSize</CODE> - The tab size</DL>
  789. </DD>
  790. </DL>
  791. <HR>
  792. <A NAME="format(java.lang.String, int, int)"><!-- --></A><H3>
  793. format</H3>
  794. <PRE>
  795. public static java.lang.String <B>format</B>(java.lang.String&nbsp;text,
  796. int&nbsp;maxLineLength,
  797. int&nbsp;tabSize)</PRE>
  798. <DL>
  799. <DD>Formats the specified text by merging and breaking lines to the
  800. specified width.
  801. <P>
  802. <DD><DL>
  803. <DT><B>Parameters:</B><DD><CODE>text</CODE> - The text<DD><CODE>maxLineLength</CODE> - The maximum line length<DD><CODE>tabSize</CODE> - The tab size</DL>
  804. </DD>
  805. </DL>
  806. <HR>
  807. <A NAME="indexIgnoringWhitespace(java.lang.String, int)"><!-- --></A><H3>
  808. indexIgnoringWhitespace</H3>
  809. <PRE>
  810. public static int <B>indexIgnoringWhitespace</B>(java.lang.String&nbsp;str,
  811. int&nbsp;index)</PRE>
  812. <DL>
  813. <DD>Inverse of <code>ignoringWhitespaceIndex()</code>.
  814. <P>
  815. <DD><DL>
  816. <DT><B>Parameters:</B><DD><CODE>str</CODE> - a string (not an empty string)<DD><CODE>index</CODE> - The index
  817. <DT><B>Returns:</B><DD>The number of non-whitespace characters that precede the index.<DT><B>Since:</B></DT>
  818. <DD>jEdit 4.3pre2</DD>
  819. </DL>
  820. </DD>
  821. </DL>
  822. <HR>
  823. <A NAME="ignoringWhitespaceIndex(java.lang.String, int)"><!-- --></A><H3>
  824. ignoringWhitespaceIndex</H3>
  825. <PRE>
  826. public static int <B>ignoringWhitespaceIndex</B>(java.lang.String&nbsp;str,
  827. int&nbsp;index)</PRE>
  828. <DL>
  829. <DD>Inverse of <code>indexIgnoringWhitespace()</code>.
  830. <P>
  831. <DD><DL>
  832. <DT><B>Parameters:</B><DD><CODE>str</CODE> - a string (not an empty string)<DD><CODE>index</CODE> - The index
  833. <DT><B>Returns:</B><DD>The index into the string where the number of non-whitespace
  834. characters that precede the index is count.<DT><B>Since:</B></DT>
  835. <DD>jEdit 4.3pre2</DD>
  836. </DL>
  837. </DD>
  838. </DL>
  839. <HR>
  840. <A NAME="getStringCase(java.lang.String)"><!-- --></A><H3>
  841. getStringCase</H3>
  842. <PRE>
  843. public static int <B>getStringCase</B>(java.lang.String&nbsp;str)</PRE>
  844. <DL>
  845. <DD>Returns if the specified string is all upper case, all lower case,
  846. or title case (first letter upper case, rest lower case).
  847. <P>
  848. <DD><DL>
  849. <DT><B>Parameters:</B><DD><CODE>str</CODE> - The string<DT><B>Since:</B></DT>
  850. <DD>jEdit 4.0pre1</DD>
  851. </DL>
  852. </DD>
  853. </DL>
  854. <HR>
  855. <A NAME="toTitleCase(java.lang.String)"><!-- --></A><H3>
  856. toTitleCase</H3>
  857. <PRE>
  858. public static java.lang.String <B>toTitleCase</B>(java.lang.String&nbsp;str)</PRE>
  859. <DL>
  860. <DD>Converts the specified string to title case, by capitalizing the
  861. first letter.
  862. <P>
  863. <DD><DL>
  864. <DT><B>Parameters:</B><DD><CODE>str</CODE> - The string<DT><B>Since:</B></DT>
  865. <DD>jEdit 4.0pre1</DD>
  866. </DL>
  867. </DD>
  868. </DL>
  869. <HR>
  870. <A NAME="indexIgnoringWhitespace(java.lang.String, int, int, java.lang.StringBuffer)"><!-- --></A><H3>
  871. indexIgnoringWhitespace</H3>
  872. <PRE>
  873. public static void <B>indexIgnoringWhitespace</B>(java.lang.String&nbsp;text,
  874. int&nbsp;maxLineLength,
  875. int&nbsp;tabSize,
  876. java.lang.StringBuffer&nbsp;buf)</PRE>
  877. <DL>
  878. <DD><DL>
  879. </DL>
  880. </DD>
  881. </DL>
  882. <!-- ========= END OF CLASS DATA ========= -->
  883. <HR>
  884. <!-- ======= START OF BOTTOM NAVBAR ====== -->
  885. <A NAME="navbar_bottom"><!-- --></A>
  886. <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
  887. <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
  888. <TR>
  889. <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
  890. <A NAME="navbar_bottom_firstrow"><!-- --></A>
  891. <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  892. <TR ALIGN="center" VALIGN="top">
  893. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  894. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  895. <TD BGCOLOR="#00008B" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  896. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/TextUtilities.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  897. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  898. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  899. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  900. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  901. </TR>
  902. </TABLE>
  903. </TD>
  904. <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
  905. </EM>
  906. </TD>
  907. </TR>
  908. <TR>
  909. <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  910. &nbsp;<A HREF="../../../../org/gjt/sp/jedit/ServiceManager.ServiceFoldHandlerProvider.html" title="class in org.gjt.sp.jedit"><B>PREV CLASS</B></A>&nbsp;
  911. &nbsp;<A HREF="../../../../org/gjt/sp/jedit/View.html" title="class in org.gjt.sp.jedit"><B>NEXT CLASS</B></A></FONT></TD>
  912. <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  913. <A HREF="../../../../index.html?org/gjt/sp/jedit/TextUtilities.html" target="_top"><B>FRAMES</B></A> &nbsp;
  914. &nbsp;<A HREF="TextUtilities.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
  915. &nbsp;
  916. <NOSCRIPT>
  917. <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
  918. </NOSCRIPT>
  919. </FONT></TD>
  920. </TR>
  921. <TR>
  922. <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  923. SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
  924. <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  925. DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
  926. </TR>
  927. </TABLE>
  928. <A NAME="skip-navbar_bottom"></A>
  929. <!-- ======== END OF BOTTOM NAVBAR ======= -->
  930. <HR>
  931. </BODY>
  932. </HTML>