java.lang.Object
io.sf.carte.doc.style.css.parser.CommentRemover
Utility class that removes CSS comments from a string.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic StringBuilder
removeComments
(String cssText) Takes a string and returns aStringBuilder
with the CSS comments removed.static StringBuilder
removeCommentsUntil
(String cssText, int removeUntilIdx) Takes a string and returns aStringBuilder
with the CSS comments preceding the given index removed.
-
Constructor Details
-
CommentRemover
public CommentRemover()
-
-
Method Details
-
removeComments
Takes a string and returns aStringBuilder
with the CSS comments removed.- Parameters:
cssText
- the CSS text to remove comments from.- Returns:
- a
StringBuilder
containing the text with the comments removed.
-
removeCommentsUntil
Takes a string and returns aStringBuilder
with 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
StringBuilder
containing the text with the comments removed.
-