added static chopComment() which chops everything after a closing comment tag
This commit is contained in:
parent
b40e39c98c
commit
0af3973929
1 changed files with 17 additions and 0 deletions
|
@ -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
|
* reads a complete file
|
||||||
*
|
*
|
||||||
|
|
Loading…
Add table
Reference in a new issue