Package io.sf.carte.doc.style.css.parser
Class CommentRemover
java.lang.Object
io.sf.carte.doc.style.css.parser.CommentRemover
Utility class that removes CSS comments from a string.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringBuilderremoveComments(String cssText) Takes a string and returns aStringBuilderwith the CSS comments removed.static StringBuilderremoveCommentsUntil(String cssText, int removeUntilIdx) Takes a string and returns aStringBuilderwith the CSS comments preceding the given index removed.
-
Constructor Details
-
CommentRemover
public CommentRemover()
-
-
Method Details
-
removeComments
Takes a string and returns aStringBuilderwith the CSS comments removed.- Parameters:
cssText- the CSS text to remove comments from.- Returns:
- a
StringBuildercontaining the text with the comments removed.
-
removeCommentsUntil
Takes a string and returns aStringBuilderwith the CSS comments preceding the given index removed.- Parameters:
cssText- the CSS text to remove comments from.removeUntilIdx- the index after which the comments won't be removed.- Returns:
- a
StringBuildercontaining the text with the comments removed.
-