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 and Description StringUtil()
-
Method Summary
All Methods Modifier and Type Method and Description static String
getHash(String content)
Generate a hash for given content.
static String
removeComments(String code)
Removes comments (block comments and line comments) from the JS code.
static String
removeComments(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 fromReturns:
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
- iftrue
then ' is also considered a string and comments will not be considered inside itReturns:
the code with removed comments
-
-