/**
* Statische Hilfsmethoden zur Stringbehandlung
*
- * @version $Id: StringUtil.java,v 1.33.2.5 2003/10/23 14:55:28 rk Exp $
+ * @version $Id: StringUtil.java,v 1.33.2.6 2005/02/10 16:22:30 rhindes Exp $
* @author mir-coders group
*
*/
}
/**
- * Ersetzt in String <code>s</code> das Regexp <code>pattern</code> durch <code>substitute</code>
- * @param s
+ * Replaces in <code>haystack</code> matching <code>pattern</code> by <code>substitute</code>
+ * @param haystack
* @param pattern
* @param substitute
- * @return String mit den Ersetzungen
+ * @return String with replacements.
*/
public static String regexpReplace(String haystack, String pattern, String substitute) {
try {
/**
* this routine takes text in url format and makes
* a clickaeble "<href>" link removing any "illegal" html tags
- * @param haystack, the url
- * @param title, the href link text
- * @param imagRoot, the place to find icons
- * @param extImage, the url of the icon to show next to the link
+ * @param haystack the url
+ * @param title the href link text
+ * @param imageRoot the place to find icons
+ * @param extImage the url of the icon to show next to the link
* @return a String containing the url
*/
public static String createURLLinks(String haystack, String title, String imageRoot,String extImage) {
if (title == null) {
return re_url.substituteAll(haystack,"<img src=\""+imageRoot+"/"+extImage+"\" border=\"0\"/> <a href=\"$0\">$0</a>");
- } else {
- title = removeHTMLTags(title);
- return re_url.substituteAll(haystack,"<img src=\""+imageRoot+"/"+extImage+"\" border=\"0\"/> <a href=\"$0\">"+title+"</a>");
}
+ title = removeHTMLTags(title);
+ return re_url.substituteAll(haystack,"<img src=\""+imageRoot+"/"+extImage+"\" border=\"0\"/> <a href=\"$0\">"+title+"</a>");
}
/**
* this routine takes text in url format and makes
* a clickaeble "<href>" link removing any "illegal" html tags
- * @param haystack, the url
- * @param imageRoot, the place to find icons
- * @param extImage, the url of the icon to show next to the link
- * @param intImage, unused
+ * @param haystack the url
+ * @param imageRoot the place to find icons
+ * @param extImage the url of the icon to show next to the link
+ * @param intImage unused
* @return a String containing the url
*/
public static String createURLLinks(String haystack, String title, String imageRoot,String extImage,String intImage) {