added static chopComment() which chops everything after a closing comment tag

This commit is contained in:
stefanp 2003-06-24 11:17:57 +00:00
parent b40e39c98c
commit 0af3973929

View file

@ -50,6 +50,23 @@ public final class Util {
}
}
/**
* chops anything that comes after a closing comment tag
*
* @param raw comment
*
* @return chopped comment
*/
public static String chopComment (String comment) {
int idx = comment.indexOf ("*/");
if (idx>0) {
return comment.substring (0, idx+2);
} else {
return comment;
}
}
/**
* reads a complete file
*