<HTML><HEAD><!-- Generated by Together onThu Jul 06 15:08:09 GMT+04:00 2000 --><TITLE></TITLE><LINK REL="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style"></HEAD><BODY BGCOLOR="white"><!-- ========== START OF NAVBAR ========== --><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" ID="NavBarCell1"><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3"><TR ALIGN="center" VALIGN="top"><TD BGCOLOR="#EEEEFF" ID="NavBarCell1"><A HREF= "../../../../../overview-summary.html"><FONT ID="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD><TD BGCOLOR="#EEEEFF" ID="NavBarCell1"><A HREF= "package-summary.html"><FONT ID="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD><TD BGCOLOR="#FFFFFF" ID="NavBarCell1Rev"> &nbsp;<FONT ID="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD><TD BGCOLOR="#EEEEFF" ID="NavBarCell1"><A HREF= "class-use/TextUtil.html"><FONT ID="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD><TD BGCOLOR="#EEEEFF" ID="NavBarCell1"><A HREF= "package-tree.html"><FONT ID="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD><TD BGCOLOR="#EEEEFF" ID="NavBarCell1"><A HREF= "../../../../../index-all.html"><FONT ID="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD><TD BGCOLOR="#EEEEFF" ID="NavBarCell1"><A HREF= "../../../../../help-doc.html"><FONT ID="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD></TR></TABLE><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM></TD></EM></TD></TR><TR><TD BGCOLOR="white" ID="NavBarCell2"><FONT SIZE="-2">&nbsp;<A HREF= "../../../../../com/togethersoft/openapi/util/text/TextPosition.html"><B>PREV CLASS</B></A>&nbsp;&nbsp;NEXT CLASS</FONT></TD><TD BGCOLOR="white" ID="NavBarCell2"><FONT SIZE="-2">  <A HREF= "../../../../../index.html" TARGET="_top"><B>FRAMES</B></A>  &nbsp;&nbsp;<A HREF= "TextUtil.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" ID="NavBarCell3"><FONT SIZE="-2">SUMMARY:&nbsp;INNER&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF= "#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" ID="NavBarCell3"><FONT SIZE="-2">DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF= "#method_detail">METHOD</A></FONT></TD></TR></TABLE><!-- ========== END OF NAVBAR ========== --><HR><H2><FONT SIZE="-1">com.togethersoft.openapi.util.text</FONT><BR>Class TextUtil</H2><HR><DL><DT>public class <B>TextUtil</B></DL><P> Implements Text manipulations<P><DL><DT><B>Author:</B><DD>TogetherSoft</DL><HR><!--  =========== METHOD SUMMARY ===========  --><A NAME= "method_summary"></A><TABLE BORDER="1"  CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF"  ID="TableHeadingColor"> <TD COLSPAN=2><FONT SIZE= "+2"><B>Method Summary</B></FONT></TD></TR><TR BGCOLOR="white" ID="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="20%"><FONT SIZE="-1"><CODE>&nbsp;static String</CODE></FONT></TD><TD><CODE><B><A HREF= "../../../../../com/togethersoft/openapi/util/text/TextUtil.html#expandString(java.lang.String, java.util.Properties)">expandString</A></B>(String stringWithMacros, Properties macros)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Replaces all occurences of macros in the string
 Examples:
   stringWithMacros = "%%a%% = %%b%% + %%c%%";
   macros = {{"a", "5"}, {"b", "2"}, {"c", "3"}}
 result: "5 = 2 + 3"
   stringWithMacros = "%%a%% = %%b%% + %%c%%";
   macros = {{"a", "6"}, {"b", "%%c%%"}, {"c", "3"}}
 result: "6 = 3 + 3"
   stringWithMacros = "%%a%% = %%b%% + %%c%%";
   macros = {{"a", "6"}, {"b", "%%c%%"}, {"c", "%%b%%"}}
 result: thrown IllegalArgumentException - recursion found</TD></TR><TR BGCOLOR="white" ID="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="20%"><FONT SIZE="-1"><CODE>&nbsp;static String</CODE></FONT></TD><TD><CODE><B><A HREF= "../../../../../com/togethersoft/openapi/util/text/TextUtil.html#getPrefix(java.lang.String, char)">getPrefix</A></B>(String str, char separator)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Returns prefix of the line Example: getPrefix ("WebLogic.PublicID", '.') will return "WebLogic"
 getPrefix ("WebLogic.PublicID", ',') will return "WebLogic.PublicID"</TD></TR><TR BGCOLOR="white" ID="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="20%"><FONT SIZE="-1"><CODE>&nbsp;static String</CODE></FONT></TD><TD><CODE><B><A HREF= "../../../../../com/togethersoft/openapi/util/text/TextUtil.html#replace(java.lang.String, java.lang.String, java.lang.String)">replace</A></B>(String source, String searchFor, String replaceWith)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Replaces a part(s) of the source string by new contents The method replaces all occurences of searchFor in original
 string.</TD></TR><TR BGCOLOR="white" ID="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="20%"><FONT SIZE="-1"><CODE>&nbsp;static String</CODE></FONT></TD><TD><CODE><B><A HREF= "../../../../../com/togethersoft/openapi/util/text/TextUtil.html#replaceMacro(java.lang.String, java.lang.String, java.lang.String)">replaceMacro</A></B>(String source, String macroName, String macroValue)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Calls replace method to replace all occurence of source macroName rounded with mySpecDelimiter by macroValue.</TD></TR></TABLE><BR><!--  =========== METHOD DETAIL ===========  --><A NAME= "method_detail"></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" ID="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Method Detail</B></FONT></TD></TR></TABLE><BR><A NAME= "expandString(java.lang.String, java.util.Properties)"><H3>expandString</H3></A><PRE>public static String <B>expandString</B>(String stringWithMacros, Properties macros)<BR>                            throws java.lang.IllegalArgumentException</A></PRE><DL><DD> Replaces all occurences of macros in the string
 Examples:
   stringWithMacros = "%%a%% = %%b%% + %%c%%";
   macros = {{"a", "5"}, {"b", "2"}, {"c", "3"}}
 result: "5 = 2 + 3"
   stringWithMacros = "%%a%% = %%b%% + %%c%%";
   macros = {{"a", "6"}, {"b", "%%c%%"}, {"c", "3"}}
 result: "6 = 3 + 3"
   stringWithMacros = "%%a%% = %%b%% + %%c%%";
   macros = {{"a", "6"}, {"b", "%%c%%"}, {"c", "%%b%%"}}
 result: thrown IllegalArgumentException - recursion found<DD><DL><DT><B>Parameters:</B><DD>stringWithMacros - - original string<DD>macros - - properties table with macro name-values pairs<DT><B>Returns: </B>expanded string<DT><B>Throws:</B><DD>IllegalArgumentException - in case of recursive definition of macros</DL></DD></DL><HR><A NAME= "getPrefix(java.lang.String, char)"><H3>getPrefix</H3></A><PRE>public static String <B>getPrefix</B>(String str, char separator)</PRE><DL><DD> Returns prefix of the line Example: getPrefix ("WebLogic.PublicID", '.') will return "WebLogic"
 getPrefix ("WebLogic.PublicID", ',') will return "WebLogic.PublicID"</DL><HR><A NAME= "replace(java.lang.String, java.lang.String, java.lang.String)"><H3>replace</H3></A><PRE>public static String <B>replace</B>(String source, String searchFor, String replaceWith)</PRE><DL><DD> Replaces a part(s) of the source string by new contents The method replaces all occurences of searchFor in original
 string. It means that after first replacing new text (replaceWith) will not be searched for searchFor, and it's
 possible to make replacement of "%%tag%%" by "%%tag%%%%tag%%" without getting of infinitive cycle.<DD><DL><DT><B>Parameters:</B><DD>source -       a source string<DD>searchFor -    a string which should be replaced<DD>replaceWith -  a string which replaces searchFor</DL></DD></DL><HR><A NAME= "replaceMacro(java.lang.String, java.lang.String, java.lang.String)"><H3>replaceMacro</H3></A><PRE>public static String <B>replaceMacro</B>(String source, String macroName, String macroValue)</PRE><DL><DD> Calls replace method to replace all occurence of source macroName rounded with mySpecDelimiter by macroValue.
 Example, if macroName is "dir", then "%%dir%%" string occurences will be under replacement by macroValue</DL><P><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0"><TR BGCOLOR="#CCCCFF" ID="TableHeadingColor"><TD><FONT SIZE= "+0"><B>Association Links</B></FONT></TD></TR></TABLE><BR>to <B>Class </B>java.lang.String<DL><DD> The delimiter, which rounds replacing macros</DL><HR><!-- ========== START OF NAVBAR ========== --><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" ID="NavBarCell1"><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3"><TR ALIGN="center" VALIGN="top"><TD BGCOLOR="#EEEEFF" ID="NavBarCell1"><A HREF= "../../../../../overview-summary.html"><FONT ID="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD><TD BGCOLOR="#EEEEFF" ID="NavBarCell1"><A HREF= "package-summary.html"><FONT ID="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD><TD BGCOLOR="#FFFFFF" ID="NavBarCell1Rev"> &nbsp;<FONT ID="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD><TD BGCOLOR="#EEEEFF" ID="NavBarCell1"><A HREF= "class-use/TextUtil.html"><FONT ID="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD><TD BGCOLOR="#EEEEFF" ID="NavBarCell1"><A HREF= "package-tree.html"><FONT ID="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD><TD BGCOLOR="#EEEEFF" ID="NavBarCell1"><A HREF= "../../../../../index-all.html"><FONT ID="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD><TD BGCOLOR="#EEEEFF" ID="NavBarCell1"><A HREF= "../../../../../help-doc.html"><FONT ID="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD></TR></TABLE><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM></TD></EM></TD></TR><TR><TD BGCOLOR="white" ID="NavBarCell2"><FONT SIZE="-2">&nbsp;<A HREF= "../../../../../com/togethersoft/openapi/util/text/TextPosition.html"><B>PREV CLASS</B></A>&nbsp;&nbsp;NEXT CLASS</FONT></TD><TD BGCOLOR="white" ID="NavBarCell2"><FONT SIZE="-2">  <A HREF= "../../../../../index.html" TARGET="_top"><B>FRAMES</B></A>  &nbsp;&nbsp;<A HREF= "TextUtil.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" ID="NavBarCell3"><FONT SIZE="-2">SUMMARY:&nbsp;INNER&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF= "#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" ID="NavBarCell3"><FONT SIZE="-2">DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF= "#method_detail">METHOD</A></FONT></TD></TR></TABLE><!-- ========== END OF NAVBAR ========== --><HR></BODY></HTML>
