Package com.vaadin.flow.internal
Class StringUtil
- java.lang.Object
-
- com.vaadin.flow.internal.StringUtil
-
public final class StringUtil extends Object
Utility class for special string handling.For internal use only. May be renamed or removed in a future release.
- Since:
- 2.1.4
-
-
Constructor Summary
Constructors Constructor Description StringUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StringgetHash(String content)Generate a hash for given content.static StringremoveComments(String code)Removes comments (block comments and line comments) from the JS code.static StringremoveComments(String code, boolean useStringApostrophe)Removes comments (block comments and line comments) from the JS code.
-
-
-
Method Detail
-
removeComments
public static String removeComments(String code)
Removes comments (block comments and line comments) from the JS code.- Parameters:
code- code to clean comments from- Returns:
- the code with removed comments
-
removeComments
public static String removeComments(String code, boolean useStringApostrophe)
Removes comments (block comments and line comments) from the JS code.- Parameters:
code- code to clean comments fromuseStringApostrophe- iftruethen ' is also considered a string and comments will not be considered inside it- Returns:
- the code with removed comments
-
-